{"openapi":"3.0.0","servers":[{"description":"production","url":"https://api.digitalocean.com"}],"info":{"contact":{"email":"api-engineering@digitalocean.com","name":"DigitalOcean API Team"},"description":"# Introduction\n\nThe DigitalOcean API allows you to manage Droplets and resources within the\nDigitalOcean cloud in a simple, programmatic way using conventional HTTP requests.\n\nAll of the functionality that you are familiar with in the DigitalOcean\ncontrol panel is also available through the API, allowing you to script the\ncomplex actions that your situation requires.\n\nThe API documentation will start with a general overview about the design\nand technology that has been implemented, followed by reference information\nabout specific endpoints.\n\n## Requests\n\nAny tool that is fluent in HTTP can communicate with the API simply by\nrequesting the correct URI. Requests should be made using the HTTPS protocol\nso that traffic is encrypted. The interface responds to different methods\ndepending on the action required.\n\n|Method|Usage|\n|--- |--- |\n|GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method.  The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests.  Any request using the GET method is read-only and will not affect any of the objects you are querying.|\n|DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used.  This will remove the specified object if it is found.  If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.|\n|PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent.  It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.|\n|PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is is a set of instructions on how to modify a resource updating only specific attributes.|\n|POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object.  When you wish to create a new object, send a POST request to the target endpoint.|\n|HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers.  This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.|\n\n\n## HTTP Statuses\n\nAlong with the HTTP methods that the API responds to, it will also return\nstandard HTTP statuses, including error codes.\n\nIn the event of a problem, the status will contain the error code, while the\nbody of the response will usually contain additional information about the\nproblem that was encountered.\n\nIn general, if the status returned is in the 200 range, it indicates that\nthe request was fulfilled successfully and that no error was encountered.\n\nReturn codes in the 400 range typically indicate that there was an issue\nwith the request that was sent. Among other things, this could mean that you\ndid not authenticate correctly, that you are requesting an action that you\ndo not have authorization for, that the object you are requesting does not\nexist, or that your request is malformed.\n\nIf you receive a status in the 500 range, this generally indicates a\nserver-side problem. This means that we are having an issue on our end and\ncannot fulfill your request currently.\n\n400 and 500 level error responses will include a JSON object in their body,\nincluding the following attributes:\n\n|Name|Type|Description|\n|--- |--- |--- |\n|id|string|A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be \"not_found.\"|\n|message|string|A message providing additional information about the error, including details to help resolve it when possible.|\n|request_id|string|Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.|\n\n### Example Error Response\n\n```\n    HTTP/1.1 403 Forbidden\n    {\n      \"id\":       \"forbidden\",\n      \"message\":  \"You do not have access for the attempted action.\"\n    }\n```\n\n## Responses\n\nWhen a request is successful, a response body will typically be sent back in\nthe form of a JSON object. An exception to this is when a DELETE request is\nprocessed, which will result in a successful HTTP 204 status and an empty\nresponse body.\n\nInside of this JSON object, the resource root that was the target of the\nrequest will be set as the key. This will be the singular form of the word\nif the request operated on a single object, and the plural form of the word\nif a collection was processed.\n\nFor example, if you send a GET request to `/v2/droplets/$DROPLET_ID` you\nwill get back an object with a key called \"`droplet`\". However, if you send\nthe GET request to the general collection at `/v2/droplets`, you will get\nback an object with a key called \"`droplets`\".\n\nThe value of these keys will generally be a JSON object for a request on a\nsingle object and an array of objects for a request on a collection of\nobjects.\n\n### Response for a Single Object\n\n```\n    {\n        \"droplet\": {\n            \"name\": \"example.com\"\n            . . .\n        }\n    }\n```\n\n### Response for an Object Collection\n\n```\n    {\n        \"droplets\": [\n            {\n                \"name\": \"example.com\"\n                . . .\n            },\n            {\n                \"name\": \"second.com\"\n                . . .\n            }\n        ]\n    }\n```\n\n## Meta\n\nIn addition to the main resource root, the response may also contain a\n`meta` object. This object contains information about the response itself.\n\nThe `meta` object contains a `total` key that is set to the total number of\nobjects returned by the request. This has implications on the `links` object\nand pagination.\n\nThe `meta` object will only be displayed when it has a value. Currently, the\n`meta` object will have a value when a request is made on a collection (like\n`droplets` or `domains`).\n\n\n### Sample Meta Object\n\n```\n    {\n        . . .\n        \"meta\": {\n            \"total\": 43\n        }\n        . . .\n    }\n```\n\n## Links & Pagination\n\nThe `links` object is returned as part of the response body when pagination\nis enabled. By default, 20 objects are returned per page. If the response\ncontains 20 objects or fewer, no `links` object will be returned. If the\nresponse contains more than 20 objects, the first 20 will be returned along\nwith the `links` object.\n\nYou can request a different pagination limit or force pagination by\nappending `?per_page=` to the request with the number of items you would\nlike per page. For instance, to show only two results per page, you could\nadd `?per_page=2` to the end of your query. The maximum number of results\nper page is 200.\n\nThe `links` object contains a `pages` object. The `pages` object, in turn,\ncontains keys indicating the relationship of additional pages. The values of\nthese are the URLs of the associated pages. The keys will be one of the\nfollowing:\n\n*   **first**: The URI of the first page of results.\n*   **prev**: The URI of the previous sequential page of results.\n*   **next**: The URI of the next sequential page of results.\n*   **last**: The URI of the last page of results.\n\nThe `pages` object will only include the links that make sense. So for the\nfirst page of results, no `first` or `prev` links will ever be set. This\nconvention holds true in other situations where a link would not make sense.\n\n### Sample Links Object\n\n```\n    {\n        . . .\n        \"links\": {\n            \"pages\": {\n                \"last\": \"https://api.digitalocean.com/v2/images?page=2\",\n                \"next\": \"https://api.digitalocean.com/v2/images?page=2\"\n            }\n        }\n        . . .\n    }\n```\n\n## Rate Limit\n\nRequests through the API are rate limited per OAuth token. Current rate limits:\n\n*   5,000 requests per hour\n*   250 requests per minute (5% of the hourly total)\n\nOnce you exceed either limit, you will be rate limited until the next cycle\nstarts. Space out any requests that you would otherwise issue in bursts for\nthe best results.\n\nThe rate limiting information is contained within the response headers of\neach request. The relevant headers are:\n\n*   **ratelimit-limit**: The number of requests that can be made per hour.\n*   **ratelimit-remaining**: The number of requests that remain before you hit your request limit. See the information below for how the request limits expire.\n*   **ratelimit-reset**: This represents the time when the oldest request will expire. The value is given in [Unix epoch time](http://en.wikipedia.org/wiki/Unix_time). See below for more information about how request limits expire.\n\nAs long as the `ratelimit-remaining` count is above zero, you will be able\nto make additional requests.\n\nThe way that a request expires and is removed from the current limit count\nis important to understand. Rather than counting all of the requests for an\nhour and resetting the `ratelimit-remaining` value at the end of the hour,\neach request instead has its own timer.\n\nThis means that each request contributes toward the `ratelimit-remaining`\ncount for one complete hour after the request is made. When that request's\ntimer runs out, it is no longer counted towards the request limit.\n\nThis has implications on the meaning of the `ratelimit-reset` header as\nwell. Because the entire rate limit is not reset at one time, the value of\nthis header is set to the time when the _oldest_ request will expire.\n\nKeep this in mind if you see your `ratelimit-reset` value change, but not\nmove an entire hour into the future.\n\nIf the `ratelimit-remaining` reaches zero, subsequent requests will receive\na 429 error code until the request reset has been reached. You can see the\nformat of the response in the examples.\n\n**Note:** The following endpoints have special rate limit requirements that\nare independent of the limits defined above.\n\n*   Only 12 `POST` requests to the `/v2/floating_ips` endpoint to create Floating IPs can be made per 60 seconds.\n*   Only 10 `GET` requests to the `/v2/account/keys` endpoint to list SSH keys can be made per 60 seconds.\n*   Only 5 requests to any and all `v2/cdn/endpoints` can be made per 10 seconds. This includes `v2/cdn/endpoints`, \n    `v2/cdn/endpoints/$ENDPOINT_ID`, and `v2/cdn/endpoints/$ENDPOINT_ID/cache`.\n*   Only 50 strings within the `files` json struct in the `v2/cdn/endpoints/$ENDPOINT_ID/cache` [payload](https://docs.digitalocean.com/reference/api/api-reference/#operation/cdn_purge_cache) \n    can be requested every 20 seconds.\n\n### Sample Rate Limit Headers\n\n```\n    . . .\n    ratelimit-limit: 1200\n    ratelimit-remaining: 1193\n    rateLimit-reset: 1402425459\n    . . .\n```\n\n### Sample Rate Exceeded Response\n\n```\n    429 Too Many Requests\n    {\n            id: \"too_many_requests\",\n            message: \"API Rate limit exceeded.\"\n    }\n```\n\n## Curl Examples\n\nThroughout this document, some example API requests will be given using the\n`curl` command. This will allow us to demonstrate the various endpoints in a\nsimple, textual format.\n  \n  These examples assume that you are using a Linux or macOS command line. To run\nthese commands on a Windows machine, you can either use cmd.exe, PowerShell, or WSL:\n\n* For cmd.exe, use the `set VAR=VALUE` [syntax](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1)\nto define environment variables, call them with `%VAR%`, then replace all backslashes (`\\`) in the examples with carets (`^`).\n\n* For PowerShell, use the `$Env:VAR = \"VALUE\"` [syntax](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2)\nto define environment variables, call them with `$Env:VAR`, then replace `curl` with `curl.exe` and all backslashes (`\\`) in the examples with backticks (`` ` ``).\n\n* WSL is a compatibility layer that allows you to emulate a Linux terminal on a Windows machine.\nInstall WSL with our [community tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-the-windows-subsystem-for-linux-2-on-microsoft-windows-10), \nthen follow this API documentation normally.\n\nThe names of account-specific references (like Droplet IDs, for instance)\nwill be represented by variables. For instance, a Droplet ID may be\nrepresented by a variable called `$DROPLET_ID`. You can set the associated\nvariables in your environment if you wish to use the examples without\nmodification.\n\nThe first variable that you should set to get started is your OAuth\nauthorization token. The next section will go over the details of this, but\nyou can set an environmental variable for it now.\n\nGenerate a token by going to the [Apps & API](https://cloud.digitalocean.com/settings/applications)\nsection of the DigitalOcean control panel. Use an existing token if you have\nsaved one, or generate a new token with the \"Generate new token\" button.\nCopy the generated token and use it to set and export the TOKEN variable in\nyour environment as the example shows.\n\nYou may also wish to set some other variables now or as you go along. For\nexample, you may wish to set the `DROPLET_ID` variable to one of your\nDroplet IDs since this will be used frequently in the API.\n\nIf you are following along, make sure you use a Droplet ID that you control\nso that your commands will execute correctly.\n\nIf you need access to the headers of a response through `curl`, you can pass\nthe `-i` flag to display the header information along with the body. If you\nare only interested in the header, you can instead pass the `-I` flag, which\nwill exclude the response body entirely.\n\n\n### Set and Export your OAuth Token\n\n```\nexport DIGITALOCEAN_TOKEN=your_token_here\n```\n\n### Set and Export a Variable\n\n```\nexport DROPLET_ID=1111111\n```\n\n## Parameters\n\nThere are two different ways to pass parameters in a request with the API.\n\nWhen passing parameters to create or update an object, parameters should be\npassed as a JSON object containing the appropriate attribute names and\nvalues as key-value pairs. When you use this format, you should specify that\nyou are sending a JSON object in the header. This is done by setting the\n`Content-Type` header to `application/json`. This ensures that your request\nis interpreted correctly.\n\nWhen passing parameters to filter a response on GET requests, parameters can\nbe passed using standard query attributes. In this case, the parameters\nwould be embedded into the URI itself by appending a `?` to the end of the\nURI and then setting each attribute with an equal sign. Attributes can be\nseparated with a `&`. Tools like `curl` can create the appropriate URI when\ngiven parameters and values; this can also be done using the `-F` flag and\nthen passing the key and value as an argument. The argument should take the\nform of a quoted string with the attribute being set to a value with an\nequal sign.\n\n### Pass Parameters as a JSON Object\n\n```\n    curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\"name\": \"example.com\", \"ip_address\": \"127.0.0.1\"}' \\\n        -X POST \"https://api.digitalocean.com/v2/domains\"\n```\n\n### Pass Filter Parameters as a Query String\n\n```\n     curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n         -X GET \\\n         \"https://api.digitalocean.com/v2/images?private=true\"\n```\n\n## Cross Origin Resource Sharing\n\nIn order to make requests to the API from other domains, the API implements\nCross Origin Resource Sharing (CORS) support.\n\nCORS support is generally used to create AJAX requests outside of the domain\nthat the request originated from. This is necessary to implement projects\nlike control panels utilizing the API. This tells the browser that it can\nsend requests to an outside domain.\n\nThe procedure that the browser initiates in order to perform these actions\n(other than GET requests) begins by sending a \"preflight\" request. This sets\nthe `Origin` header and uses the `OPTIONS` method. The server will reply\nback with the methods it allows and some of the limits it imposes. The\nclient then sends the actual request if it falls within the allowed\nconstraints.\n\nThis process is usually done in the background by the browser, but you can\nuse curl to emulate this process using the example provided. The headers\nthat will be set to show the constraints are:\n\n*   **Access-Control-Allow-Origin**: This is the domain that is sent by the client or browser as the origin of the request. It is set through an `Origin` header.\n*   **Access-Control-Allow-Methods**: This specifies the allowed options for requests from that domain. This will generally be all available methods.\n*   **Access-Control-Expose-Headers**: This will contain the headers that will be available to requests from the origin domain.\n*   **Access-Control-Max-Age**: This is the length of time that the access is considered valid. After this expires, a new preflight should be sent.\n*   **Access-Control-Allow-Credentials**: This will be set to `true`. It basically allows you to send your OAuth token for authentication.\n\nYou should not need to be concerned with the details of these headers,\nbecause the browser will typically do all of the work for you.\n","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://www.digitalocean.com/legal/terms-of-service-agreement/","title":"DigitalOcean API","version":"2.0","x-apisguru-categories":["hosting"],"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/digitalocean/openapi/main/specification/DigitalOcean-public.v2.yaml","version":"3.0"}],"x-providerName":"digitalocean.com"},"security":[{"bearer_auth":[]}],"tags":[{"description":"1-Click applications are pre-built Droplet images or Kubernetes apps with software,\nfeatures, and configuration details already set up for you. They can be found in the\n[DigitalOcean Marketplace](https://www.digitalocean.com/docs/marketplace).","name":"1-Click Applications"},{"description":"Provides information about your current account.","name":"Account"},{"description":"Actions are records of events that have occurred on the resources in your account.\nThese can be things like rebooting a Droplet, or transferring an image to a new region.\n\nAn action object is created every time one of these actions is initiated. The action\nobject contains information about the current status of the action, start and complete\ntimestamps, and the associated resource type and ID.\n\nEvery action that creates an action object is available through this endpoint. Completed\nactions are not removed from this list and are always available for querying.\n\n**Note:** You can pass the following HTTP header with the request to have the API return\nthe `reserved_ips` stanza instead of the `floating_ips` stanza:\n\n- `Accept: application/vnd.digitalocean.reserveip+json`","name":"Actions"},{"description":"App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows\ndevelopers to publish code directly to DigitalOcean servers without worrying about the\nunderlying infrastructure.\n\nMost API operations are centered around a few core object types. Following are the\ndefinitions of these types. These definitions will be omitted from the operation-specific\ndocumentation.\n\nFor documentation on app specifications (`AppSpec` objects), please refer to the\n[product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/)).","name":"Apps"},{"description":"The billing endpoints allow you to retrieve your account balance, invoices\nand billing history.\n\n**Balance:** By sending requests to the `/v2/customers/my/balance` endpoint, you can\nretrieve the balance information for the requested customer account.\n\n**Invoices:** [Invoices](https://www.digitalocean.com/docs/accounts/billing/invoices/)\nare generated on the first of each month for every DigitalOcean\ncustomer. An invoice preview is generated daily, which can be accessed\nwith the `preview` keyword in place of `$INVOICE_UUID`. To interact with\ninvoices, you will generally send requests to the invoices endpoint at\n`/v2/customers/my/invoices`.\n\n**Billing History:** Billing history is a record of billing events for your account.\nFor example, entries may include events like payments made, invoices\nissued, or credits granted. To interact with invoices, you\nwill generally send requests to the invoices endpoint at\n`/v2/customers/my/billing_history`.","name":"Billing"},{"description":"[DigitalOcean Block Storage Volumes](https://www.digitalocean.com/docs/volumes/)\nprovide expanded storage capacity for your Droplets and can be moved\nbetween Droplets within a specific region.\n\nVolumes function as raw block devices, meaning they appear to the\noperating system as locally attached storage which can be formatted using\nany file system supported by the OS. They may be created in sizes from\n1GiB to 16TiB.\n\nBy sending requests to the `/v2/volumes` endpoint, you can list, create, or\ndelete volumes as well as attach and detach them from Droplets","name":"Block Storage"},{"description":"Block storage actions are commands that can be given to a DigitalOcean\nBlock Storage Volume. An example would be detaching or attaching a volume\nfrom a Droplet. These requests are made on the\n`/v2/volumes/$VOLUME_ID/actions` endpoint.\n\nAn action object is returned. These objects hold the current status of the\nrequested action.","name":"Block Storage Actions"},{"description":"Content hosted in DigitalOcean's object storage solution,\n[Spaces](https://www.digitalocean.com/docs/spaces/overview/),\ncan optionally be served by our globally distributed Content Delivery\nNetwork (CDN). By sending requests to `/v2/cdn/endpoints`, you can list,\ncreate, or delete CDN Endpoints as well as purge cached content. To use a\ncustom subdomain to access the CDN Endpoint, provide the ID of a\nDigitalOcean managed TLS certificate and the fully qualified domain name\nfor the custom subdomain.","name":"CDN Endpoints"},{"description":"In order to perform SSL termination on load balancers, DigitalOcean offers\ntwo types of [SSL certificate management](https://www.digitalocean.com/docs/accounts/security/#certificates):\n\n* **Custom**: User-generated certificates may be uploaded to DigitalOcean\nwhere they will be placed in a fully encrypted and isolated storage system.\n\n* **Let's Encrypt**: Certificates may be automatically generated by\nDigitalOcean utilizing an integration with Let's Encrypt, the free and\nopen certificate authority. These certificates will also be automatically\nrenewed as required.","name":"Certificates"},{"description":"DigitalOcean offers the ability for you to create a\n[private container registry](https://www.digitalocean.com/docs/images/container-registry/quickstart/)\nto store your Docker images for use with your Kubernetes clusters. This\ncontainer registry runs inside the same datacenters as your cluster,\nensuring reliable and performant rollout of image deployments.\n\nYou can only create one registry per DigitalOcean account, but you can use\nthat registry to create as many repositories as you wish.","name":"Container Registry"},{"description":"DigitalOcean's [managed database service](https://www.digitalocean.com/docs/databases)\nsimplifies the creation and management of highly available database clusters. Currently, it\noffers support for [PostgreSQL](http://www.digitalocean.com/docs/databases/postgresql/),\n[Redis](https://www.digitalocean.com/docs/databases/redis/),\n[MySQL](https://www.digitalocean.com/docs/databases/mysql/), and\n[MongoDB](https://www.digitalocean.com/docs/databases/mongodb/).\n\nBy sending requests to the `/v2/databases` endpoint, you can list, create, or delete\ndatabase clusters as well as scale the size of a cluster, add or remove read-only replicas,\nand manage other configuration details.\n\nDatabase clusters may be deployed in a multi-node, high-availability configuration.\nIf your machine type is above the basic nodes, your node plan is above the smallest option,\nor you are running MongoDB, you may additionally include up to two standby nodes in your cluster.\n\nThe size of individual nodes in a database cluster is represented by a human-readable slug,\nwhich is used in some of the following requests. Each slug denotes the node's identifier,\nCPU count, and amount of RAM, in that order.\n\nFor **Basic nodes**, reference the following table for its slug:\n\nSlug               | CPU     | RAM\n-------------------|---------|---------\ndb-s-1vcpu-1gb     | 1 vCPU  | 1 GB\ndb-s-1vcpu-2gb     | 1 vCPU  | 2 GB\ndb-s-2vcpu-4gb     | 2 vCPU  | 4 GB\ndb-s-4vcpu-8gb     | 4 vCPU  | 8 GB\ndb-s-6vcpu-16gb    | 6 vCPU  | 16 GB\ndb-s-8vcpu-32gb    | 8 vCPU  | 32 GB\ndb-s-16vcpu-64gb   | 16 vCPU | 64 GB\n\nFor **General Purpose nodes**, reference the following table for its slug:\n\nSlug               | CPU     | RAM\n-------------------|---------|---------\ngd-2vcpu-8gb       | 2 vCPU  | 8 GB\ngd-4vcpu-16gb      | 4 vCPU  | 16 GB\ngd-8vcpu-32gb      | 8 vCPU  | 32 GB\ngd-16vcpu-64gb     | 16 vCPU | 64 GB\ngd-32vcpu-128gb    | 32 vCPU | 128 GB\ngd-40vcpu-160gb    | 40 vCPU | 160 GB\n\nFor **Storage-Optimized nodes**, reference the following table for its slug:\n\nSlug               | CPU     | RAM\n-------------------|---------|---------\nso1_5-2vcpu-16gb   | 2 vCPU  | 16 GB\nso1_5-4vcpu-32gb   | 4 vCPU  | 32 GB\nso1_5-8vcpu-64gb   | 8 vCPU  | 64 GB\nso1_5-16vcpu-128gb | 16 vCPU | 128 GB\nso1_5-24vcpu-192gb | 24 vCPU | 192 GB\nso1_5-32vcpu-256gb | 32 vCPU | 256 GB\n\nFor **Memory-Optimized nodes**, reference the following table for its slug:\n\nSlug               | CPU     | RAM\n-------------------|---------|---------\nm-2vcpu-16gb       | 2 vCPU  | 16 GB\nm-4vcpu-32gb       | 4 vCPU  | 32 GB\nm-8vcpu-64gb       | 8 vCPU  | 64 GB\nm-16vcpu-128gb     | 16 vCPU | 128 GB\nm-24vcpu-192gb     | 24 vCPU | 192 GB\nm-32vcpu-256gb     | 32 vCPU | 256 GB","name":"Databases"},{"description":"Domain record resources are used to set or retrieve information about the\nindividual DNS records configured for a domain. This allows you to build\nand manage DNS zone files by adding and modifying individual records for a\ndomain.\n\nThe [DigitalOcean DNS management interface](https://www.digitalocean.com/docs/networking/dns/)\nallows you to configure the following DNS records:\n\nName  | Description                                                                                                                                        |\n------|----------------------------------------------------------------------------------------------------------------------------------------------------|\nA     | This record type is used to map an IPv4 address to a hostname.                                                                                     |\nAAAA  | This record type is used to map an IPv6 address to a hostname.                                                                                     |\nCAA   | As specified in RFC-6844, this record type can be used to restrict which certificate authorities are permitted to issue certificates for a domain. |\nCNAME | This record type defines an alias for your canonical hostname (the one defined by an A or AAAA record).                                            |\nMX    | This record type is used to define the mail exchanges used for the domain.                                                                         |\nNS    | This record type defines the name servers that are used for this zone.                                                                             |\nTXT   | This record type is used to associate a string of text with a hostname, primarily used for verification.                                           |\nSRV   | This record type specifies the location (hostname and port number) of servers for specific services.                                               |\nSOA   | This record type defines administrative information about the zone. Can only have ttl changed, cannot be deleted                                   |","name":"Domain Records"},{"description":"Domain resources are domain names that you have purchased from a domain\nname registrar that you are managing through the\n[DigitalOcean DNS interface](https://www.digitalocean.com/docs/networking/dns/).\n\nThis resource establishes top-level control over each domain. Actions that\naffect individual domain records should be taken on the\n[Domain Records](#tag/Domain-Records) resource.","name":"Domains"},{"description":"Droplet actions are tasks that can be executed on a Droplet. These can be\nthings like rebooting, resizing, snapshotting, etc.\n\nDroplet action requests are generally targeted at one of the \"actions\"\nendpoints for a specific Droplet. The specific actions are usually\ninitiated by sending a POST request with the action and arguments as\nparameters.\n\nDroplet action requests create a Droplet actions object, which can be used\nto get information about the status of an action. Creating a Droplet\naction is asynchronous: the HTTP call will return the action object before\nthe action has finished processing on the Droplet. The current status of\nan action can be retrieved from either the Droplet actions endpoint or the\nglobal actions endpoint. If a Droplet action is uncompleted it may block\nthe creation of a subsequent action for that Droplet, the locked attribute\nof the Droplet will be true and attempts to create a Droplet action will\nfail with a status of 422.","name":"Droplet Actions"},{"description":"A [Droplet](https://www.digitalocean.com/docs/droplets/) is a DigitalOcean\nvirtual machine. By sending requests to the Droplet endpoint, you can\nlist, create, or delete Droplets.\n\nSome of the attributes will have an object value. The `region` and `image`\nobjects will all contain the standard attributes of their associated\ntypes. Find more information about each of these objects in their\nrespective sections.","name":"Droplets"},{"description":"[DigitalOcean Cloud Firewalls](https://www.digitalocean.com/docs/networking/firewalls/)\nprovide the ability to restrict network access to and from a Droplet\nallowing you to define which ports will accept inbound or outbound\nconnections. By sending requests to the `/v2/firewalls` endpoint, you can\nlist, create, or delete firewalls as well as modify access rules.","name":"Firewalls"},{"description":"As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](https://docs.digitalocean.com/reference/api/api-reference/#tag/Reserved-IPs).\nThe Reserved IP product's endpoints function the exact same way as Floating IPs.\nThe only difference is the name change throughout the URLs and fields.\nFor example, the `floating_ips` field is now the `reserved_ips` field.\nThe Floating IP endpoints will remain active until fall 2023 before being\npermanently deprecated.\n\nWith the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects),\nwe will reflect this change as an additional field in the responses across the API\nwhere the `floating_ip` field is used. For example, the Droplet metadata response\nwill contain the field `reserved_ips` in addition to the `floating_ips` field.\nFloating IPs retrieved using the Projects API will retain the original name.\n\nFloating IP actions are commands that can be given to a DigitalOcean\nfloating IP. These requests are made on the actions endpoint of a specific\nfloating IP.\n\nAn action object is returned. These objects hold the current status of the\nrequested action.","name":"Floating IP Actions"},{"description":"As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](https://docs.digitalocean.com/reference/api/api-reference/#tag/Reserved-IPs).\nThe Reserved IP product's endpoints function the exact same way as Floating IPs.\nThe only difference is the name change throughout the URLs and fields.\nFor example, the `floating_ips` field is now the `reserved_ips` field.\nThe Floating IP endpoints will remain active until fall 2023 before being\npermanently deprecated.\n\nWith the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects),\nwe will reflect this change as an additional field in the responses across the API\nwhere the `floating_ip` field is used. For example, the Droplet metadata response\nwill contain the field `reserved_ips` in addition to the `floating_ips` field.\nFloating IPs retrieved using the Projects API will retain the original name.\n\n[DigitalOcean Floating IPs](https://www.digitalocean.com/docs/networking/floating-ips/)\nare publicly-accessible static IP addresses that can be mapped to one of\nyour Droplets. They can be used to create highly available setups or other\nconfigurations requiring movable addresses.\n\nFloating IPs are bound to a specific region.","name":"Floating IPs"},{"description":"[Serverless functions](https://docs.digitalocean.com/products/functions) are blocks of code that run on demand without the need to manage any infrastructure.\nYou 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).\n\nThe Serverless Functions API currently only supports creating and managing namespaces.","name":"Functions"},{"description":"Image actions are commands that can be given to a DigitalOcean image. In\ngeneral, these requests are made on the actions endpoint of a specific\nimage.\n\nAn image action object is returned. These objects hold the current status\nof the requested action.","name":"Image Actions"},{"description":"A DigitalOcean [image](https://www.digitalocean.com/docs/images/) can be\nused to create a Droplet and may come in a number of flavors. Currently,\nthere are five types of images: snapshots, backups, applications,\ndistributions, and custom images.\n\n* [Snapshots](https://www.digitalocean.com/docs/images/snapshots/) provide\na full copy of an existing Droplet instance taken on demand.\n\n* [Backups](https://www.digitalocean.com/docs/images/backups/) are similar\nto snapshots but are created automatically at regular intervals when\nenabled for a Droplet.\n\n* [Custom images](https://www.digitalocean.com/docs/images/custom-images/)\nare Linux-based virtual machine images (raw, qcow2, vhdx, vdi, and vmdk\nformats are supported) that you may upload for use on DigitalOcean.\n\n* Distributions are the public Linux distributions that are available to\nbe used as a base to create Droplets.\n\n* Applications, or [1-Click Apps](https://www.digitalocean.com/docs/one-clicks/),\nare distributions pre-configured with additional software.\n\nTo interact with images, you will generally send requests to the images\nendpoint at /v2/images.","name":"Images"},{"description":"[DigitalOcean Kubernetes](https://www.digitalocean.com/docs/kubernetes/)\nallows you to quickly deploy scalable and secure Kubernetes clusters. By\nsending requests to the `/v2/kubernetes/clusters` endpoint, you can list,\ncreate, or delete clusters as well as scale node pools up and down,\nrecycle individual nodes, and retrieve the kubeconfig file for use with\na cluster.","name":"Kubernetes"},{"description":"[DigitalOcean Load Balancers](https://www.digitalocean.com/docs/networking/load-balancers/)\nprovide a way to distribute traffic across multiple Droplets. By sending\nrequests to the `/v2/load_balancers` endpoint, you can list, create, or\ndelete load balancers as well as add or remove Droplets, forwarding rules,\nand other configuration details.","name":"Load Balancers"},{"description":"The DigitalOcean Monitoring API makes it possible to programmatically retrieve metrics as well as configure alert\npolicies based on these metrics. The Monitoring API can help you gain insight into how your apps are performing\nand consuming resources.","name":"Monitoring"},{"description":"Project Resources are resources that can be grouped into your projects.\nYou can group resources (like Droplets, Spaces, load balancers, domains,\nand floating IPs) in ways that align with the applications you host on\nDigitalOcean.\n\n### Supported Resource Types Examples\n\nProjects resources are identified by uniform resource names or URNs. A\nvalid URN has the following format: `do:resource_type:resource_id`. The\nfollowing resource types are supported:\n\nResource Type      | Example URN\n-------------------|------------\nApp Platform App   | `do:app:be5aab85-851b-4cab-b2ed-98d5a63ba4e8`\nDatabase           | `do:dbaas:83c7a55f-0d84-4760-9245-aba076ec2fb2`\nDomain             | `do:domain:example.com`\nDroplet            | `do:droplet:4126873`\nFloating IP        | `do:floatingip:192.168.99.100`\nKubernetes Cluster | `do:kubernetes:bd5f5959-5e1e-4205-a714-a914373942af`\nLoad Balancer      | `do:loadbalancer:39052d89-8dd4-4d49-8d5a-3c3b6b365b5b`\nSpace              | `do:space:my-website-assets`\nVolume             | `do:volume:6fc4c277-ea5c-448a-93cd-dd496cfef71f`\n\n### Resource Status Codes\n\nWhen assigning and retrieving resources in projects, a `status` attribute\nis returned that indicates if a resource was successfully retrieved or\nassigned. The status codes can be one of the following:\n\nStatus Code        | Explanation\n-------------------|------------\n`ok`               | There was no problem retrieving or assigning a resource.\n`not_found`        | The resource was not found.\n`assigned`         | The resource was successfully assigned.\n`already_assigned` | The resource was already assigned.\n`service_down`     | There was a problem retrieving or assigning a resource. Please try again.","name":"Project Resources"},{"description":"Projects allow you to organize your resources into groups that fit the way\nyou work. You can group resources (like Droplets, Spaces, load balancers,\ndomains, and floating IPs) in ways that align with the applications\nyou host on DigitalOcean.","name":"Projects"},{"description":"Provides information about DigitalOcean data center regions.","name":"Regions"},{"description":"As of 16 June 2022, we have renamed the [Floating IP](https://docs.digitalocean.com/reference/api/api-reference/#tag/Floating-IPs)\nproduct to Reserved IPs. The Reserved IP product's endpoints function the exact\nsame way as Floating IPs. The only difference is the name change throughout the\nURLs and fields. For example, the `floating_ips` field is now the `reserved_ips` field.\nThe Floating IP endpoints will remain active until fall 2023 before being\npermanently deprecated.\n\nWith the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects),\nwe will reflect this change as an additional field in the responses across the API\nwhere the `floating_ip` field is used. For example, the Droplet metadata response\nwill contain the field `reserved_ips` in addition to the `floating_ips` field.\nFloating IPs retrieved using the Projects API will retain the original name.\n\nReserved IP actions are commands that can be given to a DigitalOcean\nreserved IP. These requests are made on the actions endpoint of a specific\nreserved IP.\n\nAn action object is returned. These objects hold the current status of the\nrequested action.","name":"Reserved IP Actions"},{"description":"As of 16 June 2022, we have renamed the [Floating IP](https://docs.digitalocean.com/reference/api/api-reference/#tag/Floating-IPs)\nproduct to Reserved IPs. The Reserved IP product's endpoints function the exact\nsame way as Floating IPs. The only difference is the name change throughout the\nURLs and fields. For example, the `floating_ips` field is now the `reserved_ips` field.\nThe Floating IP endpoints will remain active until fall 2023 before being\npermanently deprecated.\n\nWith the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects),\nwe will reflect this change as an additional field in the responses across the API\nwhere the `floating_ip` field is used. For example, the Droplet metadata response\nwill contain the field `reserved_ips` in addition to the `floating_ips` field.\nFloating IPs retrieved using the Projects API will retain the original name.\n\nDigitalOcean Reserved IPs are publicly-accessible static IP addresses that can be\nmapped to one of your Droplets. They can be used to create highly available\nsetups or other configurations requiring movable addresses.\n\nReserved IPs are bound to a specific region.","name":"Reserved IPs"},{"description":"The sizes objects represent different packages of hardware resources that\ncan be used for Droplets. When a Droplet is created, a size must be\nselected so that the correct resources can be allocated.\n\nEach size represents a plan that bundles together specific sets of\nresources. This includes the amount of RAM, the number of virtual CPUs,\ndisk space, and transfer. The size object also includes the pricing\ndetails and the regions that the size is available in.","name":"Sizes"},{"description":"[Snapshots](https://www.digitalocean.com/docs/images/snapshots/) are saved\ninstances of a Droplet or a block storage volume, which is reflected in\nthe `resource_type` attribute. In order to avoid problems with compressing\nfilesystems, each defines a `min_disk_size` attribute which is the minimum\nsize of the Droplet or volume disk when creating a new resource from the\nsaved snapshot.\n\nTo interact with snapshots, you will generally send requests to the\nsnapshots endpoint at `/v2/snapshots`.","name":"Snapshots"},{"description":"Manage SSH keys available on your account.","name":"SSH Keys"},{"description":"A tag is a label that can be applied to a resource (currently Droplets,\nImages, Volumes, Volume Snapshots, and Database clusters) in order to\nbetter organize or facilitate the lookups and actions on it.\n\nTags have two attributes: a user defined `name` attribute and an embedded\n`resources` attribute with information about resources that have been tagged.","name":"Tags"},{"description":"[DigitalOcean Uptime Checks](https://docs.digitalocean.com/products/uptime/) provide the ability to monitor your endpoints from around the world, and alert you when they're slow, unavailable, or SSL certificates are expiring.\nTo interact with Uptime, you will generally send requests to the Uptime endpoint at `/v2/uptime/`.","name":"Uptime"},{"description":"[VPCs (virtual private clouds)](https://www.digitalocean.com/docs/networking/vpc/)\nallow you to create virtual networks containing resources that can\ncommunicate with each other in full isolation using private IP addresses.\n\nBy sending requests to the `/v2/vpcs` endpoint, you can create, configure,\nlist, and delete custom VPCs as well as retrieve information about the\nresources assigned to them.","name":"VPCs"}],"paths":{"/v2/1-clicks":{"get":{"description":"To list all available 1-Click applications, send a GET request to `/v2/1-clicks`. The `type` may\nbe provided as query paramater in order to restrict results to a certain type of 1-Click, for\nexample: `/v2/1-clicks?type=droplet`. Current supported types are `kubernetes` and `droplet`.\n\nThe response will be a JSON object with a key called `1_clicks`. This will be set to an array of\n1-Click application data, each of which will contain the the slug and type for the 1-Click.\n","operationId":"oneClicks_list","parameters":[{"description":"Restrict results to a certain type of 1-Click.","example":"kubernetes","in":"query","name":"type","required":false,"schema":{"enum":["droplet","kubernetes"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"All 1-Click Applications":{"value":{"1_clicks":[{"slug":"monitoring","type":"kubernetes"},{"slug":"wordpress-18-04","type":"droplet"}]}}},"schema":{"properties":{"1_clicks":{"items":{"properties":{"slug":{"description":"The slug identifier for the 1-Click application.","example":"monitoring","title":"slug","type":"string"},"type":{"description":"The type of the 1-Click application.","example":"kubernetes","title":"type","type":"string"}},"required":["slug","type"],"type":"object"},"type":"array"}}}}},"description":"A JSON object with a key of `1_clicks`.","headers":{"ratelimit-limit":{"description":"The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.","example":5000,"schema":{"type":"integer"}},"ratelimit-remaining":{"description":"The number of requests in your hourly quota that remain before you hit your request limit. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire.","example":4816,"schema":{"type":"integer"}},"ratelimit-reset":{"description":"The time when the oldest request will expire. The value is given in Unix epoch time. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire.","example":1444931833,"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"example":{"id":"unauthorized","message":"Unable to authenticate you."},"schema":{"properties":{"id":{"description":"A short identifier corresponding to the HTTP status code returned. For  example, the ID for a response returning a 404 status code would be \"not_found.\"","example":"not_found","type":"string"},"message":{"description":"A message providing additional information about the error, including  details to help resolve it when possible.","example":"The resource you were accessing could not be found.","type":"string"},"request_id":{"description":"Optionally, some endpoints may include a request ID that should be  provided when reporting bugs or opening support tickets to help  identify the issue.","example":"4d9d8375-3c56-4925-a3e7-eb137fed17e9","type":"string"}},"required":["id","message"],"type":"object"}}},"description":"Unauthorized","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"content":{"application/json":{"example":{"id":"too_many_requests","message":"API Rate limit exceeded."},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"API Rate limit exceeded","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"500":{"content":{"application/json":{"example":{"id":"server_error","message":"Unexpected server-side error"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Server error.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"default":{"content":{"application/json":{"example":{"id":"example_error","message":"some error message"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Unexpected error","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}}},"security":[{"bearer_auth":[]}],"summary":"List 1-Click Applications","tags":["1-Click Applications"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\"  \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/1-clicks\""}]}},"/v2/1-clicks/kubernetes":{"post":{"description":"To install a Kubernetes 1-Click application on a cluster, send a POST request to\n`/v2/1-clicks/kubernetes`. The `addon_slugs` and `cluster_uuid` must be provided as body\nparameter in order to specify which 1-Click application(s) to install. To list all available\n1-Click Kubernetes applications, send a request to `/v2/1-clicks?type=kubernetes`.\n","operationId":"oneClicks_install_kubernetes","requestBody":{"content":{"application/json":{"schema":{"properties":{"addon_slugs":{"default":[],"description":"An array of 1-Click Application slugs to be installed to the Kubernetes cluster.","example":["kube-state-metrics","loki"],"items":{"type":"string"},"title":"addon_slugs","type":"array"},"cluster_uuid":{"description":"A unique ID for the Kubernetes cluster to which the 1-Click Applications will be installed.","example":"50a994b6-c303-438f-9495-7e896cfe6b08","title":"cluster_uuid","type":"string"}},"required":["addon_slugs","cluster_uuid"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"Install a 1-Click Application":{"value":{"message":"Successfully kicked off addon job."}}},"schema":{"properties":{"message":{"description":"A message about the result of the request.","example":"Successfully kicked off addon job.","type":"string"}},"type":"object"}}},"description":"The response will verify that a job has been successfully created to install a 1-Click. The\npost-installation lifecycle of a 1-Click application can not be managed via the DigitalOcean\nAPI. For additional details specific to the 1-Click, find and view its\n[DigitalOcean Marketplace](https://marketplace.digitalocean.com) page.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Install Kubernetes 1-Click Applications","tags":["1-Click Applications"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"addon_slugs\": [\"kube-state-metrics\", \"loki\"], \"cluster_uuid\": \"50a994b6-c303-438f-9495-7e896cfe6b08\"}'' \\\n  \"https://api.digitalocean.com/v2/1-clicks/kubernetes\""}]}},"/v2/account":{"get":{"description":"To show information about the current user account, send a GET request to `/v2/account`.","operationId":"account_get","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"account":{"properties":{"droplet_limit":{"description":"The total number of Droplets current user or team may have active at one time.","example":25,"type":"integer"},"email":{"description":"The email address used by the current user to register for DigitalOcean.","example":"sammy@digitalocean.com","type":"string"},"email_verified":{"default":false,"description":"If true, the user has verified their account via email. False otherwise.","example":true,"type":"boolean"},"floating_ip_limit":{"description":"The total number of Floating IPs the current user or team may have.","example":5,"type":"integer"},"status":{"default":"active","description":"This value is one of \"active\", \"warning\" or \"locked\".","enum":["active","warning","locked"],"example":"active","type":"string"},"status_message":{"description":"A human-readable message giving more details about the status of the account.","example":" ","type":"string"},"team":{"description":"When authorized in a team context, includes information about the current team.","properties":{"name":{"description":"The name for the current team.","example":"My Team","type":"string"},"uuid":{"description":"The unique universal identifier for the current team.","example":"5df3e3004a17e242b7c20ca6c9fc25b701a47ece","type":"string"}},"type":"object"},"uuid":{"description":"The unique universal identifier for the current user.","example":"b6fr89dbf6d9156cace5f3c78dc9851d957381ef","type":"string"}},"required":["droplet_limit","floating_ip_limit","email","uuid","email_verified","status","status_message"],"type":"object"}}}}},"description":"A JSON object keyed on account with an excerpt of the current user account data.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get User Information","tags":["Account"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/account\""}]}},"/v2/account/keys":{"get":{"description":"To list all of the keys in your account, send a GET request to `/v2/account/keys`. The response will be a JSON object with a key set to `ssh_keys`. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes.","operationId":"sshKeys_list","parameters":[{"description":"Number of items returned per page","example":2,"in":"query","name":"per_page","required":false,"schema":{"default":20,"maximum":200,"minimum":1,"type":"integer"}},{"description":"Which 'page' of paginated results to return.","example":1,"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"ssh_keys":{"items":{"properties":{"fingerprint":{"description":"A unique identifier that differentiates this key from other keys using  a format that SSH recognizes. The fingerprint is created when the key is added to your account.","example":"3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa","readOnly":true,"type":"string"},"id":{"description":"A unique identification number for this key. Can be used to embed a  specific SSH key into a Droplet.","example":512189,"readOnly":true,"type":"integer"},"name":{"description":"A human-readable display name for this key, used to easily identify the SSH keys when they are displayed.","example":"My SSH Public Key","type":"string"},"public_key":{"description":"The entire public key string that was uploaded. Embedded into the root user's `authorized_keys` file if you include this key during Droplet creation.","example":"ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example","type":"string"}},"required":["public_key","name"],"type":"object"},"type":"array"}}},{"properties":{"links":{"properties":{"pages":{"anyOf":[{"allOf":[{"properties":{"last":{"description":"URI of the last page of the results.","example":"https://api.digitalocean.com/v2/images?page=2","type":"string"}},"type":"object"},{"properties":{"next":{"description":"URI of the next page of the results.","example":"https://api.digitalocean.com/v2/images?page=2","type":"string"}},"type":"object"}]},{"allOf":[{"properties":{"first":{"description":"URI of the first page of the results.","example":"https://api.digitalocean.com/v2/images?page=1","type":"string"}},"type":"object"},{"properties":{"prev":{"description":"URI of the previous page of the results.","example":"https://api.digitalocean.com/v2/images?page=1","type":"string"}},"type":"object"}]},{}],"example":{"pages":{"first":"https://api.digitalocean.com/v2/account/keys?page=1","prev":"https://api.digitalocean.com/v2/account/keys?page=2"}}}},"type":"object"}},"type":"object"},{"properties":{"meta":{"allOf":[{"description":"Information about the response itself.","properties":{"total":{"description":"Number of objects returned by the request.","example":1,"type":"integer"}},"type":"object"},{"required":["total"]}]}},"required":["meta"],"type":"object"}],"example":{"links":{},"meta":{"total":1},"ssh_keys":[{"fingerprint":"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45","id":289794,"name":"Other Public Key","public_key":"ssh-rsa ANOTHEREXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V anotherexample"}]}}}},"description":"A JSON object with the key set to `ssh_keys`. The value is an array of `ssh_key` objects, each of which contains the standard `ssh_key` attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All SSH Keys","tags":["SSH Keys"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/account/keys\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    keys, _, err := client.Keys.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nssh_keys = client.ssh_keys.all\nssh_keys.each"}]},"post":{"description":"To add a new SSH public key to your DigitalOcean account, send a POST request to `/v2/account/keys`. Set the `name` attribute to the name you wish to use and the `public_key` attribute to the full public key you are adding.","operationId":"sshKeys_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"ssh_key":{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items"}}}}},"description":"The response body will be a JSON object with a key set to `ssh_key`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}},"links":{"sshKeys_delete_by_fingerprint":{"description":"The `fingerprint` value returned in the response can be used as the  `ssh_key_identifier` parameter in `DELETE /v2/account/keys/{ssh_key_identifier}`.","operationId":"ssh_keys_delete_by_fingerprint","parameters":{"ssh_key_identifier":"$response.body#/ssh_key/fingerprint"}},"sshKeys_delete_by_id":{"description":"The `id` value returned in the response can be used as the  `ssh_key_identifier` parameter in `DELETE /v2/account/keys/{ssh_key_identifier}`.","operationId":"sshKeys_delete_by_id","parameters":{"ssh_key_identifier":"$response.body#/ssh_key/id"}},"sshKeys_get_by_fingerprint":{"description":"The `fingerprint` value returned in the response can be used as the `ssh_key_identifier` parameter in `GET /v2/account/keys/{ssh_key_identifier}`.","operationId":"sshKeys_get_by_fingerprint","parameters":{"ssh_key_identifier":"$response.body#/ssh_key/fingerprint"}},"sshKeys_get_by_id":{"description":"The `id` value returned in the response can be used as the `ssh_key_identifier` parameter in `GET /v2/account/keys/{ssh_key_identifier}`.","operationId":"sshKeys_get_by_id","parameters":{"ssh_key_identifier":"$response.body#/ssh_key/id"}}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New SSH Key","tags":["SSH Keys"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"My SSH Public Key\",\"public_key\":\"ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example\"}' \\\n  \"https://api.digitalocean.com/v2/account/keys\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.KeyCreateRequest{\n        Name:      \"My SSH Public Key\",\n        PublicKey: \"ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example\",\n    }\n\n    transfer, _, err := client.Keys.Create(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nssh_key = DropletKit::SSHKey.new(\n  name: 'My SSH Public Key',\n  public_key: 'ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example'\n)\nclient.ssh_keys.create(ssh_key)"}]}},"/v2/account/keys/{ssh_key_identifier}":{"delete":{"description":"To destroy a public SSH key that you have in your account, send a DELETE request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.\nA 204 status will be returned, indicating that the action was successful and that the response body is empty.","operationId":"sshKeys_delete","parameters":[{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/parameters/0"}],"responses":{"204":{"description":"The action was successful and the response body is empty.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an SSH Key","tags":["SSH Keys"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/account/keys/512190\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Keys.DeleteByID(ctx, 512190)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.ssh_keys.delete(id: 512190)"}]},"get":{"description":"To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.\nThe response will be a JSON object with the key `ssh_key` and value an ssh_key object which contains the standard ssh_key attributes.","operationId":"sshKeys_get","parameters":[{"description":"Either the ID or the fingerprint of an existing SSH key.","example":512189,"in":"path","name":"ssh_key_identifier","required":true,"schema":{"anyOf":[{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items/properties/id"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items/properties/fingerprint"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ssh_key":{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items"}}}}},"description":"A JSON object with the key set to `ssh_key`. The value is an `ssh_key` object containing the standard `ssh_key` attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}},"links":{"sshKeys_delete_by_fingerprint":{"$ref":"#/paths/~1v2~1account~1keys/post/responses/201/links/sshKeys_delete_by_fingerprint"},"sshKeys_delete_by_id":{"$ref":"#/paths/~1v2~1account~1keys/post/responses/201/links/sshKeys_delete_by_id"},"sshKeys_get_by_fingerprint":{"$ref":"#/paths/~1v2~1account~1keys/post/responses/201/links/sshKeys_get_by_fingerprint"},"sshKeys_get_by_id":{"$ref":"#/paths/~1v2~1account~1keys/post/responses/201/links/sshKeys_get_by_id"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"content":{"application/json":{"example":{"id":"not_found","message":"The resource you requested could not be found."},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"The resource was not found.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing SSH Key","tags":["SSH Keys"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/account/keys/512190\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    key, _, err := client.Keys.GetByID(ctx, 512190)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.ssh_keys.find(id: 512190) "}]},"put":{"description":"To update the name of an SSH key, send a PUT request to either `/v2/account/keys/$SSH_KEY_ID` or `/v2/account/keys/$SSH_KEY_FINGERPRINT`. Set the `name` attribute to the new name you want to use.","operationId":"sshKeys_update","parameters":[{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/0/properties/ssh_keys/items/properties/name"}},"type":"object"}}},"description":"Set the `name` attribute to the new name you want to use.","required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update an SSH Key's Name","tags":["SSH Keys"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"Renamed SSH Key\"}' \\\n  \"https://api.digitalocean.com/v2/account/keys/512190\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.KeyUpdateRequest{\n        Name:      \"Renamed SSH Key\",\n    }\n\n    key, _, err := client.Keys.UpdateByID(ctx, 512190, updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nssh_key = DropletKit::SSHKey.new(name: 'Renamed SSH Key')\nclient.ssh_keys.update(ssh_key, id: 512190)"}]}},"/v2/actions":{"get":{"description":"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.","operationId":"actions_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions":{"items":{"properties":{"completed_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the action was completed.","example":"2025-08-15T13:52:28.118Z","format":"date-time","nullable":true,"type":"string"},"id":{"description":"A unique numeric ID that can be used to identify and reference an action.","example":36804636,"type":"integer"},"region":{"properties":{"available":{"description":"This is a boolean value that represents whether new Droplets can be created in this region.","example":true,"type":"boolean"},"features":{"description":"This attribute is set to an array which contains features available in this region","example":["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"],"items":{"type":"string"}},"name":{"description":"The display name of the region.  This will be a full name that is used in the control panel and other interfaces.","example":"New York 3","type":"string"},"sizes":{"description":"This attribute is set to an array which contains the identifying slugs for the sizes available in this region.","example":["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"],"items":{"type":"string"}},"slug":{"description":"A human-readable string that is used as a unique identifier for each region.","example":"nyc3","type":"string"}},"required":["available","features","name","sizes","slug"],"type":"object"},"region_slug":{"allOf":[{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region/properties/slug"},{"nullable":true,"type":"string"}]},"resource_id":{"description":"A unique identifier for the resource that the action is associated with.","example":3164444,"nullable":true,"type":"integer"},"resource_type":{"description":"The type of resource that the action is associated with.","example":"droplet","type":"string"},"started_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the action was initiated.","example":"2025-08-15T13:52:28.118Z","format":"date-time","type":"string"},"status":{"default":"in-progress","description":"The current status of the action. This can be \"in-progress\", \"completed\", or \"errored\".","enum":["in-progress","completed","errored"],"example":"completed","type":"string"},"type":{"description":"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.","example":"create","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"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","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Actions","tags":["Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n  \"context\"\n    \"os\"\n\n  \"github.com/digitalocean/godo\"\n  )\n\nfunc main() {\n  token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n  client := godo.NewFromToken(token)\n  ctx := context.TODO()\n\n  opt := &godo.ListOptions{\n      Page:    1,\n      PerPage: 200,\n  }\n  actions, _, err := client.Actions.List(ctx, opt)\n  }"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nactions = client.actions.all\nactions.each"}]}},"/v2/actions/{action_id}":{"get":{"description":"To retrieve a specific action object, send a GET request to `/v2/actions/$ACTION_ID`.","operationId":"actions_get","parameters":[{"description":"A unique numeric ID that can be used to identify and reference an action.","example":36804636,"in":"path","name":"action_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"action":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"}}}}},"description":"The result will be a JSON object with an action key.  This will be set to an action object containing the standard action attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Action","tags":["Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/actions/36804636\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.Actions.Get(ctx, 36804636)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.actions.find(id: 36804636)"}]}},"/v2/apps":{"get":{"description":"List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app.","operationId":"apps_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"description":"Whether the project_id of listed apps should be fetched and included.","example":true,"in":"query","name":"with_projects","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"examples":{"apps":{"value":{"apps":[{"active_deployment":{"created_at":"2025-08-15T13:52:28.118Z","id":"3aa4d20e-5527-4c00-b496-601fbd22520a","phase_last_updated_at":"2025-08-15T13:52:28.118Z","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":"basic-xxs","name":"sample-php","routes":[{"path":"/"}],"run_command":"heroku-php-apache2"}]},"updated_at":"2025-08-15T13:52:28.118Z"},"cause":"app spec updated","created_at":"2025-08-15T13:52:28.118Z","default_ingress":"https://sample-php-iaj87.ondigitalocean.app","domains":[{"certificate_expires_at":"2025-08-15T13:52:28.118Z","id":"0831f444-a1a7-11ed-828c-ef59494480b5","phase":"ACTIVE","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.118Z","name":"default-ingress-ready","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-zone","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-ns-records","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"verify-nameservers","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-record","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-alias-record","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-wildcard-record","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"verify-cname","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-ssl-txt-record-saved","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-ssl-txt-record","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-renewal-email","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-CA-authorization","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"ensure-certificate","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"create-deployment","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"configuration-alert","started_at":"2025-08-15T13:52:28.118Z","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":"2025-08-15T13:52:28.118Z","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":"2025-08-15T13:52:28.118Z","id":"3aa4d20e-5527-4c00-b496-601fbd22520a","phase_last_updated_at":"2025-08-15T13:52:28.118Z","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":"basic-xxs","name":"sample-php","routes":[{"path":"/"}],"run_command":"heroku-php-apache2"}]},"updated_at":"2025-08-15T13:52:28.118Z"},"progress":{"phase":"ACTIVE","steps":[{"ended_at":"2025-08-15T13:52:28.118Z","name":"build","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS","steps":[{"ended_at":"2025-08-15T13:52:28.118Z","name":"initialize","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.118Z","name":"components","started_at":"2025-08-15T13:52:28.118Z","status":"SUCCESS","steps":[{"component_name":"sample-php","ended_at":"2025-08-15T13:52:28.118Z","message_base":"Building service","name":"sample-php","started_at":"2025-08-15T13:52:28.118Z","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":"basic-xxs","name":"sample-php","routes":[{"path":"/"}],"run_command":"heroku-php-apache2"}]},"tier_slug":"basic","updated_at":"2025-08-15T13:52:28.118Z"}],"links":{"pages":{}},"meta":{"total":1}}}},"schema":{"allOf":[{"properties":{"apps":{"items":{"description":"An application's configuration and status.","properties":{"active_deployment":{"properties":{"cause":{"example":"commit 9a4df0b pushed to github/digitalocean/sample-golang","title":"What caused this deployment to be created","type":"string"},"cloned_from":{"example":"3aa4d20e-5527-4c00-b496-601fbd22520a","title":"The ID of a previous deployment that this deployment was cloned from","type":"string"},"created_at":{"example":"2025-08-15T13:52:28.118Z","format":"date-time","title":"The creation time of the deployment","type":"string"},"functions":{"items":{"properties":{"name":{"example":"my-functions-component","title":"The name of this functions component","type":"string"},"namespace":{"description":"The namespace where the functions are deployed.","example":"ap-b2a93513-8d9b-4223-9d61-5e7272c81c32","type":"string"},"source_commit_hash":{"description":"The commit hash of the repository that was used to build this functions component.","example":"54d4a727f457231062439895000d45437c7bb405","type":"string"}},"type":"object"},"title":"Functions components that are part of this deployment","type":"array"},"id":{"example":"b6bdf840-2854-4f87-a36c-5f231c617c84","title":"The ID of the deployment","type":"string"},"jobs":{"items":{"properties":{"name":{"example":"migrate-db","title":"The name of this job","type":"string"},"source_commit_hash":{"example":"54d4a727f457231062439895000d45437c7bb405","title":"The commit hash of the repository that was used to build this job","type":"string"}},"type":"object"},"title":"Job components that are part of this deployment","type":"array"},"phase":{"default":"UNKNOWN","enum":["UNKNOWN","PENDING_BUILD","BUILDING","PENDING_DEPLOY","DEPLOYING","ACTIVE","SUPERSEDED","ERROR","CANCELED"],"example":"ACTIVE","type":"string"},"phase_last_updated_at":{"example":"2025-08-15T13:52:28.118Z","format":"date-time","title":"When the deployment phase was last updated","type":"string"},"progress":{"properties":{"error_steps":{"example":3,"format":"int32","title":"Number of unsuccessful steps","type":"integer"},"pending_steps":{"example":2,"format":"int32","title":"Number of pending steps","type":"integer"},"running_steps":{"example":2,"format":"int32","title":"Number of currently running steps","type":"integer"},"steps":{"items":{"properties":{"component_name":{"example":"component","title":"The component name that this step is associated with","type":"string"},"ended_at":{"example":"2025-08-15T13:52:28.118Z","format":"date-time","title":"The end time of this step","type":"string"},"message_base":{"description":"The base of a human-readable description of the step intended to be combined with the component name for presentation. For example:\n\n`message_base` = \"Building service\"\n`component_name` = \"api\"","example":"Building service","type":"string"},"name":{"example":"example_step","title":"The name of this step","type":"string"},"reason":{"properties":{"code":{"example":"Title of Error","title":"The error code","type":"string"},"message":{"example":"This is an error","title":"The error message","type":"string"}},"type":"object"},"started_at":{"example":"2025-08-15T13:52:28.118Z","format":"date-time","title":"The start time of this step","type":"string"},"status":{"default":"UNKNOWN","enum":["UNKNOWN","PENDING","RUNNING","ERROR","SUCCESS"],"example":"SUCCESS","type":"string"},"steps":{"items":{"type":"object"},"title":"Child steps of this step","type":"array"}},"title":"A step that is run as part of the deployment's lifecycle","type":"object"},"title":"The deployment's steps","type":"array"},"success_steps":{"example":4,"format":"int32","title":"Number of successful steps","type":"integer"},"summary_steps":{"items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/progress/properties/steps/items"},"title":"A flattened summary of the steps","type":"array"},"total_steps":{"example":5,"format":"int32","title":"Total number of steps","type":"integer"}},"type":"object"},"services":{"items":{"properties":{"name":{"example":"web","title":"The name of this service","type":"string"},"source_commit_hash":{"example":"54d4a727f457231062439895000d45437c7bb405","title":"The commit hash of the repository that was used to build this service","type":"string"}},"type":"object"},"title":"Service components that are part of this deployment","type":"array"},"spec":{"description":"The desired configuration of an application.","properties":{"databases":{"description":"Database instances which can provide persistence to workloads within the\napplication.","items":{"properties":{"cluster_name":{"description":"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.","example":"cluster_name","type":"string"},"db_name":{"description":"The name of the MySQL or PostgreSQL database to configure.","example":"my_db","type":"string"},"db_user":{"description":"The name of the MySQL or PostgreSQL user to configure.","example":"superuser","type":"string"},"engine":{"default":"UNSET","description":"- MYSQL: MySQL\n- PG: PostgreSQL\n- REDIS: Redis","enum":["UNSET","MYSQL","PG","REDIS"],"example":"PG","type":"string"},"name":{"description":"The name. Must be unique across all components within the same app.","example":"prod-db","maxLength":32,"minLength":2,"pattern":"^[a-z][a-z0-9-]{0,30}[a-z0-9]$","type":"string"},"production":{"description":"Whether this is a production or dev database.","example":true,"type":"boolean"},"version":{"description":"The version of the database engine","example":"12","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"domains":{"description":"A set of hostnames where the application will be available.","items":{"properties":{"domain":{"description":"The hostname for the domain","example":"app.example.com","maxLength":253,"minLength":4,"pattern":"^((xn--)?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-zA-Z]{2,}\\.?$","type":"string"},"minimum_tls_version":{"description":"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\"`.","enum":["1.2","1.3"],"example":"1.3","maxLength":3,"minLength":3,"type":"string"},"type":{"default":"UNSPECIFIED","description":"- DEFAULT: The default `.ondigitalocean.app` domain assigned to this app\n- 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.\n- ALIAS: A non-primary domain","enum":["UNSPECIFIED","DEFAULT","PRIMARY","ALIAS"],"example":"DEFAULT","type":"string"},"wildcard":{"description":"Indicates whether the domain includes all sub-domains, in addition to the given domain","example":true,"type":"boolean"},"zone":{"description":"Optional. If the domain uses DigitalOcean DNS and you would like App\nPlatform to automatically manage it for you, set this to the name of the\ndomain on your account.\n\nFor example, If the domain you are adding is `app.domain.com`, the zone\ncould be `domain.com`.","example":"example.com","format":"hostname","type":"string"}},"required":["domain"],"type":"object"},"type":"array"},"functions":{"description":"Workloads which expose publicly-accessible HTTP services via Functions Components.","items":{"properties":{"alerts":{"items":{"properties":{"disabled":{"description":"Is the alert disabled?","example":false,"type":"boolean"},"operator":{"default":"UNSPECIFIED_OPERATOR","enum":["UNSPECIFIED_OPERATOR","GREATER_THAN","LESS_THAN"],"example":"GREATER_THAN","type":"string"},"rule":{"default":"UNSPECIFIED_RULE","enum":["UNSPECIFIED_RULE","CPU_UTILIZATION","MEM_UTILIZATION","RESTART_COUNT","DEPLOYMENT_FAILED","DEPLOYMENT_LIVE","DOMAIN_FAILED","DOMAIN_LIVE","FUNCTIONS_ACTIVATION_COUNT","FUNCTIONS_AVERAGE_DURATION_MS","FUNCTIONS_ERROR_RATE_PER_MINUTE","FUNCTIONS_AVERAGE_WAIT_TIME_MS","FUNCTIONS_ERROR_COUNT","FUNCTIONS_GB_RATE_PER_SECOND"],"example":"CPU_UTILIZATION","type":"string"},"value":{"description":"Threshold value for alert","example":2.32,"format":"float","type":"number"},"window":{"default":"UNSPECIFIED_WINDOW","enum":["UNSPECIFIED_WINDOW","FIVE_MINUTES","TEN_MINUTES","THIRTY_MINUTES","ONE_HOUR"],"example":"FIVE_MINUTES","type":"string"}},"type":"object"},"type":"array"},"cors":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/2/properties/cors"},"envs":{"description":"A list of environment variables made available to the component.","items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0/properties/envs/items"},"type":"array"},"git":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0/properties/git"},"github":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0/properties/github"},"gitlab":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0/properties/gitlab"},"log_destinations":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0/properties/log_destinations"},"name":{"description":"The name. Must be unique across all components within the same app.","example":"api","maxLength":32,"minLength":2,"pattern":"^[a-z][a-z0-9-]{0,30}[a-z0-9]$","type":"string"},"routes":{"description":"A list of HTTP routes that should be routed to this component.","items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/2/properties/routes/items"},"type":"array"},"source_dir":{"description":"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.","example":"path/to/dir","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"ingress":{"description":"Specification for app ingress configurations.","properties":{"rules":{"description":"Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.","items":{"properties":{"component":{"description":"The component to route to. Only one of `component` or `redirect` may be set.","properties":{"name":{"description":"The name of the component to route to.","example":"web","type":"string"},"preserve_path_prefix":{"description":"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`. Note: this is not applicable for Functions Components and is mutually exclusive with `rewrite`.","example":"true","type":"string"},"rewrite":{"description":"An optional field that will rewrite the path of the component to be what is specified here. 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 you specified the rewrite to be `/v1/`, requests to `/api/list` would be rewritten to `/v1/list`. Note: this is mutually exclusive with `preserve_path_prefix`.","example":"/api/v1/","type":"string"}},"required":["name"],"type":"object"},"cors":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/2/properties/cors"},"match":{"description":"The match configuration for the rule.","properties":{"path":{"description":"The path to match on.","properties":{"prefix":{"description":"Prefix-based match. For example, `/api` will match `/api`, `/api/`, and any nested paths such as `/api/v1/endpoint`.","example":"/api","maxLength":256,"type":"string"}},"required":["prefix"],"type":"object"}},"required":["path"],"type":"object"},"redirect":{"description":"The redirect configuration for the rule. Only one of `component` or `redirect` may be set.","properties":{"authority":{"description":"The authority/host to redirect to. This can be a hostname or IP address. Note: use `port` to set the port.","example":"example.com","type":"string"},"port":{"description":"The port to redirect to.","example":443,"format":"int64","type":"integer"},"redirect_code":{"description":"The redirect code to use. Defaults to `302`. Supported values are 300, 301, 302, 303, 304, 307, 308.","example":302,"format":"int64","type":"integer"},"scheme":{"description":"The scheme to redirect to. Supported values are `http` or `https`. Default: `https`.","example":"https","type":"string"},"uri":{"description":"An optional URI path to redirect to. Note: if this is specified the whole URI of the original request will be overwritten to this value, irrespective of the original request URI being matched.","example":"/about","type":"string"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"},"jobs":{"description":"Pre and post deployment workloads which do not expose publicly-accessible HTTP routes.","items":{"allOf":[{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0"},{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/1"},{"properties":{"kind":{"default":"UNSPECIFIED","description":"- UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind.\n- PRE_DEPLOY: Indicates a job that runs before an app deployment.\n- POST_DEPLOY: Indicates a job that runs after an app deployment.\n- FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy.","enum":["UNSPECIFIED","PRE_DEPLOY","POST_DEPLOY","FAILED_DEPLOY"],"example":"PRE_DEPLOY","type":"string"}},"required":["name"],"type":"object"}]},"type":"array"},"name":{"description":"The name of the app. Must be unique across all apps in the same account.","example":"web-app-01","maxLength":32,"minLength":2,"pattern":"^[a-z][a-z0-9-]{0,30}[a-z0-9]$","type":"string"},"region":{"description":"The slug form of the geographical origin of the app. Default: `nearest available`","enum":["ams","nyc","fra","sfo","sgp","blr","tor","lon","syd"],"example":"nyc","type":"string"},"services":{"description":"Workloads which expose publicly-accessible HTTP services.","items":{"allOf":[{"properties":{"build_command":{"description":"An optional build command to run while building this component from source.","example":"npm run build","type":"string"},"dockerfile_path":{"description":"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.","example":"path/to/Dockerfile","type":"string"},"environment_slug":{"description":"An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/).","example":"node-js","type":"string"},"envs":{"description":"A list of environment variables made available to the component.","items":{"properties":{"key":{"description":"The variable name","example":"BASE_URL","pattern":"^[_A-Za-z][_A-Za-z0-9]*$","type":"string"},"scope":{"default":"RUN_AND_BUILD_TIME","description":"- RUN_TIME: Made available only at run-time\n- BUILD_TIME: Made available only at build-time\n- RUN_AND_BUILD_TIME: Made available at both build and run-time","enum":["UNSET","RUN_TIME","BUILD_TIME","RUN_AND_BUILD_TIME"],"example":"BUILD_TIME","type":"string"},"type":{"default":"GENERAL","description":"- GENERAL: A plain-text environment variable\n- SECRET: A secret encrypted environment variable","enum":["GENERAL","SECRET"],"example":"GENERAL","type":"string"},"value":{"description":"The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.","example":"http://example.com","type":"string"}},"required":["key"],"type":"object"},"type":"array"},"git":{"properties":{"branch":{"description":"The name of the branch to use","example":"main","type":"string"},"repo_clone_url":{"description":"The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git`","example":"https://github.com/digitalocean/sample-golang.git","type":"string"}},"type":"object"},"github":{"properties":{"branch":{"description":"The name of the branch to use","example":"main","type":"string"},"deploy_on_push":{"description":"Whether to automatically deploy new commits made to the repo","example":true,"type":"boolean"},"repo":{"description":"The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang`","example":"digitalocean/sample-golang","type":"string"}},"type":"object"},"gitlab":{"properties":{"branch":{"description":"The name of the branch to use","example":"main","type":"string"},"deploy_on_push":{"description":"Whether to automatically deploy new commits made to the repo","example":true,"type":"boolean"},"repo":{"description":"The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang`","example":"digitalocean/sample-golang","type":"string"}},"type":"object"},"image":{"properties":{"registry":{"description":"The registry name. Must be left empty for the `DOCR` registry type.","example":"registry.hub.docker.com","type":"string"},"registry_type":{"description":"- DOCKER_HUB: The DockerHub container registry type.\n- DOCR: The DigitalOcean container registry type.","enum":["DOCKER_HUB","DOCR"],"example":"DOCR","type":"string"},"repository":{"description":"The repository name.","example":"origin/master","type":"string"},"tag":{"default":"latest","description":"The repository tag. Defaults to `latest` if not provided.","example":"latest","type":"string"}},"type":"object"},"log_destinations":{"properties":{"datadog":{"description":"DataDog configuration.","properties":{"api_key":{"description":"Datadog API key.","example":"abcdefghijklmnopqrstuvwxyz0123456789","type":"string"},"endpoint":{"description":"Datadog HTTP log intake endpoint.","example":"https://mydatadogendpoint.com","type":"string"}},"required":["api_key"],"type":"object"},"logtail":{"description":"Logtail configuration.","properties":{"token":{"description":"Logtail token.","example":"abcdefghijklmnopqrstuvwxyz0123456789","type":"string"}},"required":["endpoint"],"type":"object"},"name":{"example":"my_log_destination","maxLength":42,"minLength":2,"pattern":"^[A-Za-z0-9()\\[\\]'\"][-A-Za-z0-9_. \\/()\\[\\]]{0,40}[A-Za-z0-9()\\[\\]'\"]$","type":"string"},"papertrail":{"description":"Papertrail configuration.","properties":{"endpoint":{"description":"Papertrail syslog endpoint.","example":"https://mypapertrailendpoint.com","type":"string"}},"required":["endpoint"],"type":"object"}},"required":["name"],"title":"Configurations for external logging.","type":"object"},"name":{"description":"The name. Must be unique across all components within the same app.","example":"api","maxLength":32,"minLength":2,"pattern":"^[a-z][a-z0-9-]{0,30}[a-z0-9]$","type":"string"},"run_command":{"description":"An optional run command to override the component's default.","example":"bin/api","type":"string"},"source_dir":{"description":"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.","example":"path/to/dir","type":"string"}},"type":"object"},{"properties":{"instance_count":{"default":1,"description":"The amount of instances that this component should be scaled to. Default: 1","example":2,"format":"int64","minimum":1,"type":"integer"},"instance_size_slug":{"default":"basic-xxs","description":"The instance size to use for this component. Default: `basic-xxs`","enum":["basic-xxs","basic-xs","basic-s","basic-m","professional-xs","professional-s","professional-m","professional-1l","professional-l","professional-xl"],"example":"basic-xxs","type":"string"}},"type":"object"},{"properties":{"cors":{"properties":{"allow_credentials":{"description":"Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is include. This configures the `Access-Control-Allow-Credentials` header.","example":false,"type":"boolean"},"allow_headers":{"description":"The set of allowed HTTP request headers. This configures the `Access-Control-Allow-Headers` header.","example":["Content-Type","X-Custom-Header"],"items":{"type":"string"},"type":"array"},"allow_methods":{"description":"The set of allowed HTTP methods. This configures the `Access-Control-Allow-Methods` header.","example":["GET","OPTIONS","POST","PUT","PATCH","DELETE"],"items":{"type":"string"},"type":"array"},"allow_origins":{"description":"The set of allowed CORS origins.","example":[{"exact":"https://www.example.com"},{"regex":"^.*example.com"}],"items":{"properties":{"exact":{"description":"Exact string match. Only 1 of `exact`, `prefix`, or `regex` must be set.","example":"https://www.example.com","maxLength":256,"minLength":1,"type":"string"},"prefix":{"description":"Prefix-based match. Only 1 of `exact`, `prefix`, or `regex` must be set.","example":"https://www.example.com","maxLength":256,"minLength":1,"type":"string"},"regex":{"description":"RE2 style regex-based match. Only 1 of `exact`, `prefix`, or `regex` must be set. For more information about RE2 syntax, see: https://github.com/google/re2/wiki/Syntax","example":"^.*example.com","maxLength":256,"minLength":1,"type":"string"}},"type":"object"},"type":"array"},"expose_headers":{"description":"The set of HTTP response headers that browsers are allowed to access. This configures the `Access-Control-Expose-Headers` header.","example":["Content-Encoding","X-Custom-Header"],"items":{"type":"string"},"type":"array"},"max_age":{"description":"An optional duration specifying how long browsers can cache the results of a preflight request. This configures the `Access-Control-Max-Age` header.","example":"5h30m","type":"string"}},"type":"object"},"health_check":{"properties":{"failure_threshold":{"description":"The number of failed health checks before considered unhealthy.","example":2,"format":"int32","type":"integer"},"http_path":{"description":"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.","example":"/health","type":"string"},"initial_delay_seconds":{"description":"The number of seconds to wait before beginning health checks.","example":30,"format":"int32","type":"integer"},"period_seconds":{"description":"The number of seconds to wait between health checks.","example":60,"format":"int32","type":"integer"},"port":{"description":"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.","example":80,"format":"int64","maximum":65535,"minimum":1,"type":"integer"},"success_threshold":{"description":"The number of successful health checks before considered healthy.","example":3,"format":"int32","type":"integer"},"timeout_seconds":{"description":"The number of seconds after which the check times out.","example":45,"format":"int32","type":"integer"}},"type":"object"},"http_port":{"description":"The internal port on which this service's run command will listen. Default: 8080\nIf 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.","example":3000,"format":"int64","maximum":65535,"minimum":1,"type":"integer"},"internal_ports":{"description":"The ports on which this service will listen for internal traffic.","example":[80,443],"items":{"format":"int64","type":"integer"},"type":"array"},"routes":{"description":"A list of HTTP routes that should be routed to this component.","items":{"properties":{"path":{"description":"An HTTP path prefix. Paths must start with / and must be unique across all components within an app.","example":"/api","type":"string"},"preserve_path_prefix":{"description":"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`.","example":true,"type":"boolean"}},"title":"A criterion for routing HTTP traffic to a component.","type":"object"},"type":"array"}},"required":["name"],"type":"object"}]},"type":"array"},"static_sites":{"description":"Content which can be rendered to static web assets.","items":{"allOf":[{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0"},{"properties":{"catchall_document":{"description":"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.","example":"index.html","type":"string"},"cors":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/2/properties/cors"},"error_document":{"default":"404.html","description":"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.","example":"error.html","type":"string"},"index_document":{"default":"index.html","description":"The name of the index document to use when serving this static site. Default: index.html","example":"main.html","type":"string"},"output_dir":{"description":"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`.","example":"dist/","type":"string"},"routes":{"description":"A list of HTTP routes that should be routed to this component.","items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/2/properties/routes/items"},"type":"array"}},"type":"object"}],"required":["name"]},"type":"array"},"workers":{"description":"Workloads which do not expose publicly-accessible HTTP services.","items":{"allOf":[{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/0"},{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/services/items/allOf/1"}],"required":["name"]},"type":"array"}},"required":["name"],"title":"AppSpec","type":"object"},"static_sites":{"items":{"properties":{"name":{"example":"web","title":"The name of this static site","type":"string"},"source_commit_hash":{"example":"54d4a727f457231062439895000d45437c7bb405","title":"The commit hash of the repository that was used to build this static site","type":"string"}},"type":"object"},"title":"Static Site components that are part of this deployment","type":"array"},"tier_slug":{"example":"basic","readOnly":true,"title":"The current pricing tier slug of the deployment","type":"string"},"updated_at":{"example":"2025-08-15T13:52:28.119Z","format":"date-time","title":"When the deployment was last updated","type":"string"},"workers":{"items":{"properties":{"name":{"example":"queue-runner","title":"The name of this worker","type":"string"},"source_commit_hash":{"example":"54d4a727f457231062439895000d45437c7bb405","title":"The commit hash of the repository that was used to build this worker","type":"string"}},"type":"object"},"title":"Worker components that are part of this deployment","type":"array"}},"title":"An app deployment","type":"object"},"created_at":{"example":"2025-08-15T13:52:28.119Z","format":"date-time","readOnly":true,"title":"The creation time of the app","type":"string"},"default_ingress":{"example":"digitalocean.com","readOnly":true,"title":"The default hostname on which the app is accessible","type":"string"},"domains":{"items":{"properties":{"certificate_expires_at":{"example":"2025-08-15T13:52:28.119Z","format":"date-time","readOnly":true,"title":"Current SSL certificate expiration time","type":"string"},"id":{"example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","title":"The ID of the domain","type":"string"},"phase":{"default":"UNKNOWN","enum":["UNKNOWN","PENDING","CONFIGURING","ACTIVE","ERROR"],"example":"ACTIVE","type":"string"},"progress":{"properties":{"steps":{"items":{"type":"object"},"title":"The steps of the domain's progress","type":"array"}},"type":"object"},"rotate_validation_records":{"readOnly":true,"title":"Validation values have changed and require manual intervention","type":"boolean"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/domains/items"},"validations":{"items":{"properties":{"txt_name":{"example":"_acme-challenge.app.example.com","readOnly":true,"title":"TXT record name","type":"string"},"txt_value":{"example":"lXLOcN6cPv0nproViNcUHcahD9TrIPlNgdwesj0pYpk","readOnly":true,"title":"TXT record value","type":"string"}}},"title":"List of TXT validation records","type":"array"}},"type":"object"},"readOnly":true,"title":"Contains all domains for the app","type":"array"},"id":{"example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","readOnly":true,"title":"The ID of the application","type":"string"},"in_progress_deployment":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment"},"last_deployment_created_at":{"example":"2025-08-15T13:52:28.119Z","format":"date-time","readOnly":true,"title":"The creation time of the last deployment","type":"string"},"live_domain":{"example":"live_domain","readOnly":true,"title":"The live domain of the app","type":"string"},"live_url":{"example":"google.com","readOnly":true,"title":"The live URL of the app","type":"string"},"live_url_base":{"example":"digitalocean.com","readOnly":true,"title":"The live URL base of the app, the URL excluding the path","type":"string"},"owner_uuid":{"example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","readOnly":true,"title":"The ID of the account to which the application belongs","type":"string"},"pending_deployment":{"allOf":[{"description":"The most recent pending deployment. For CreateApp and UpdateApp transactions this is guaranteed to reflect the associated deployment."},{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment"}]},"pinned_deployment":{"allOf":[{"description":"The deployment that the app is pinned to."},{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment"}]},"project_id":{"example":"88b72d1a-b78a-4d9f-9090-b53c4399073f","readOnly":true,"title":"The ID of the project the app is assigned to. This will be empty if there is a lookup failure.","type":"string"},"region":{"properties":{"continent":{"example":"europe","readOnly":true,"title":"The continent that this region is in","type":"string"},"data_centers":{"example":["ams"],"items":{"example":"ams","type":"string"},"readOnly":true,"title":"Data centers that are in this region","type":"array"},"default":{"description":"Whether or not the region is presented as the default.","example":true,"readOnly":true,"type":"boolean"},"disabled":{"example":true,"readOnly":true,"title":"Whether or not the region is open for new apps","type":"boolean"},"flag":{"example":"ams","readOnly":true,"title":"The flag of this region","type":"string"},"label":{"example":"ams","readOnly":true,"title":"A human-readable name of the region","type":"string"},"reason":{"example":"to crowded","readOnly":true,"title":"Reason that this region is not available","type":"string"},"slug":{"example":"basic","readOnly":true,"title":"The slug form of the region name","type":"string"}},"title":"Geographical information about an app origin","type":"object"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec"},"tier_slug":{"example":"basic","readOnly":true,"title":"The current pricing tier slug of the app","type":"string"},"updated_at":{"example":"2025-08-15T13:52:28.119Z","format":"date-time","readOnly":true,"title":"Time of the app's last configuration update","type":"string"}},"required":["spec"],"type":"object"},"title":"A list of apps","type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with a `apps` key. This is list of object `apps`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Apps","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps\""}]},"post":{"description":"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/).","operationId":"apps_create","parameters":[{"description":"The content-type that should be used by the response. By default, the response will be `application/json`. `application/yaml` is also supported.","example":"application/json","in":"header","name":"Accept","schema":{"enum":["application/json","application/yaml"],"type":"string"}},{"description":"The content-type used for the request. By default, the requests are assumed to use `application/json`. `application/yaml` is also supported.","example":"application/json","in":"header","name":"Content-Type","schema":{"enum":["application/json","application/yaml"],"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"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":"basic-xxs","name":"api","routes":[{"path":"/api"}],"run_command":"bin/api"}]}},"schema":{"properties":{"project_id":{"description":"The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project.","type":"string"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec"}},"required":["spec"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"app":{"value":{"app":{"active_deployment":{"cause":"manual","created_at":"2025-08-15T13:52:28.119Z","id":"991dfa59-6a23-459f-86d6-67dfa2c6f1e3","phase":"ACTIVE","phase_last_updated_at":"2025-08-15T13:52:28.119Z","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.119Z","name":"build","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS","steps":[{"ended_at":"2025-08-15T13:52:28.119Z","name":"initialize","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"components","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS","steps":[{"component_name":"web","message_base":"Building service","name":"web","status":"SUCCESS"}]}]},{"ended_at":"2025-08-15T13:52:28.119Z","name":"deploy","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS","steps":[{"ended_at":"2025-08-15T13:52:28.119Z","name":"initialize","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"components","started_at":"2025-08-15T13:52:28.119Z","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":"2025-08-15T13:52:28.119Z","name":"finalize","started_at":"2025-08-15T13:52:28.119Z","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":"basic-xxs","name":"web","routes":[{"path":"/"}],"run_command":"bin/sample-golang"}]},"tier_slug":"basic","updated_at":"2025-08-15T13:52:28.119Z"},"created_at":"2025-08-15T13:52:28.119Z","default_ingress":"https://sample-golang-zyhgn.ondigitalocean.app","domains":[{"certificate_expires_at":"2025-08-15T13:52:28.119Z","id":"e206c64e-a1a3-11ed-9e6e-9b7b6dc9a52b","phase":"CONFIGURING","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.119Z","name":"default-ingress-ready","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-zone","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-ns-records","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"verify-nameservers","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-record","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-alias-record","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-wildcard-record","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"verify-cname","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-ssl-txt-record-saved","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-ssl-txt-record","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-renewal-email","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-CA-authorization","started_at":"2025-08-15T13:52:28.119Z","status":"SUCCESS"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"ensure-certificate","started_at":"2025-08-15T13:52:28.119Z","status":"RUNNING"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"create-deployment","started_at":"2025-08-15T13:52:28.119Z","status":"PENDING"},{"ended_at":"2025-08-15T13:52:28.119Z","name":"configuration-alert","started_at":"2025-08-15T13:52:28.119Z","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":"2025-08-15T13:52:28.119Z","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":"basic-xxs","name":"sample-php","routes":[{"path":"/"}],"run_command":"heroku-php-apache2"}]}},"project_id":"88b72d1a-b78a-4d9f-9090-b53c4399073f","region":{"continent":"Europe","data_centers":["ams3"],"flag":"netherlands","label":"Amsterdam","slug":"ams"},"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":"basic-xxs","name":"web","routes":[{"path":"/"}],"run_command":"bin/sample-golang"}]},"tier_slug":"basic","updated_at":"2025-08-15T13:52:28.119Z"}}}},"schema":{"properties":{"app":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items"}},"type":"object"}}},"description":"A JSON or YAML of a `spec` object.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New App","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps\"\n  -d '{\"spec\":{\"name\":\"web-app\",\"region\":\"nyc\", \\\n  \"services\":[{\"name\":\"api\",\"github\":{\"branch\":\"main\",\\\n  \"deploy_on_push\":true,\"repo\":\"digitalocean/sample-golang\"}, \\\n  \"run_command\":\"bin/api\",\"environment_slug\":\"node-js\", \\\n  \"instance_count\":2,\"instance_size_slug\":\"basic-xxs\", \\\n  \"routes\":[{\"path\":\"/api\"}]}]}}'"}]}},"/v2/apps/metrics/bandwidth_daily":{"post":{"description":"Retrieve daily bandwidth usage metrics for multiple apps.","operationId":"apps_list_metrics_bandwidth_daily","requestBody":{"content":{"application/json":{"example":{"app_ids":["4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","c2a93513-8d9b-4223-9d61-5e7272c81cf5"],"date":"2025-08-15T13:52:28.119Z"},"schema":{"properties":{"app_ids":{"description":"A list of app IDs to query bandwidth metrics for.","example":["4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","c2a93513-8d9b-4223-9d61-5e7272c81cf5"],"items":{"type":"string"},"maxItems":100,"type":"array"},"date":{"description":"Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday.","example":"2025-08-15T13:52:28.119Z","format":"date-time","type":"string"}},"required":["app_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"app_bandwidth_usage":{"value":{"app_bandwidth_usage":[{"app_id":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","bandwidth_bytes":"513668"},{"app_id":"c2a93513-8d9b-4223-9d61-5e7272c81cf5","bandwidth_bytes":"254847"}],"date":"2025-08-15T13:52:28.119Z"}}},"schema":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1metrics~1bandwidth_daily/get/responses/200/content/application~1json/schema"}}},"description":"A JSON object with a `app_bandwidth_usage` key","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Multiple Apps' Daily Bandwidth Metrics","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/metrics/bandwidth_daily\" \\\n  -d '{ \"app_ids\": [\"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf\"] }'"}]}},"/v2/apps/propose":{"post":{"description":"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.","operationId":"apps_validate_appSpec","requestBody":{"content":{"application/json":{"example":{"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":"basic-xxs","name":"api","routes":[{"path":"/api"}],"run_command":"bin/api"}]}},"schema":{"properties":{"app_id":{"description":"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.","example":"b6bdf840-2854-4f87-a36c-5f231c617c84","type":"string"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec"}},"required":["spec"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"propose":{"value":{"app_cost":5,"app_name_available":true,"app_tier_upgrade_cost":17,"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":"basic-xxs","name":"web","routes":[{"path":"/"}],"run_command":"bin/sample-golang"}]}}}},"schema":{"properties":{"app_cost":{"description":"The monthly cost of the proposed app in USD using the next pricing plan tier. For example, if you propose an app that uses the Basic tier, the `app_tier_upgrade_cost` field displays the monthly cost of the app if it were to use the Professional tier. If the proposed app already uses the most expensive tier, the field is empty.","example":5,"format":"int32","type":"integer"},"app_is_static":{"description":"Indicates whether the app is a static app.","example":true,"type":"boolean"},"app_name_available":{"description":"Indicates whether the app name is available.","example":true,"type":"boolean"},"app_name_suggestion":{"description":"The suggested name if the proposed app name is unavailable.","example":"newName","type":"string"},"app_tier_downgrade_cost":{"description":"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.","example":17,"format":"int32","type":"integer"},"existing_static_apps":{"description":"The maximum number of free static apps the account can have. We will charge you for any additional static apps.","example":"2","type":"string"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec"}},"type":"object"}}},"description":"A JSON object.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Propose an App Spec","tags":["Apps"]}},"/v2/apps/regions":{"get":{"description":"List all regions supported by App Platform.","operationId":"apps_list_regions","responses":{"200":{"content":{"application/json":{"examples":{"regions":{"value":{"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"}]}}},"schema":{"properties":{"regions":{"items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/region"},"type":"array"}},"type":"object"}}},"description":"A JSON object with key `regions`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List App Regions","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/regions\""}]}},"/v2/apps/tiers":{"get":{"description":"List all app tiers.","operationId":"apps_list_tiers","responses":{"200":{"content":{"application/json":{"examples":{"tiers":{"value":{"tiers":[{"build_seconds":"6000","egress_bandwidth_bytes":"1073741824","name":"Starter","slug":"starter"},{"build_seconds":"24000","egress_bandwidth_bytes":"42949672960","name":"Basic","slug":"basic"},{"build_seconds":"60000","egress_bandwidth_bytes":"107374182400","name":"Professional","slug":"professional"}]}}},"schema":{"properties":{"tiers":{"items":{"properties":{"build_seconds":{"example":"233","format":"int64","title":"The amount of included build time in seconds","type":"string"},"egress_bandwidth_bytes":{"example":"123","format":"int64","title":"The amount of included outbound bandwidth in bytes","type":"string"},"name":{"example":"test","title":"A human-readable name of the tier","type":"string"},"slug":{"example":"test","title":"The slug of the tier","type":"string"},"storage_bytes":{"example":"10000000","format":"int64","title":"The allotted disk space in bytes","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"A JSON object with a `tiers` key. This will be a list of all app tiers","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List App Tiers","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/tiers\""}]}},"/v2/apps/tiers/instance_sizes":{"get":{"description":"List all instance sizes for `service`, `worker`, and `job` components.","operationId":"apps_list_instanceSizes","responses":{"200":{"content":{"application/json":{"examples":{"instance_sizes":{"value":{"instance_sizes":[{"cpu_type":"SHARED","cpus":"1","memory_bytes":"536870912","name":"Basic XXS","slug":"basic-xxs","tier_slug":"basic","tier_upgrade_to":"professional-xs","usd_per_month":"5.00","usd_per_second":"0.000002066799"},{"cpu_type":"SHARED","cpus":"1","memory_bytes":"1073741824","name":"Basic XS","slug":"basic-xs","tier_slug":"basic","tier_upgrade_to":"professional-xs","usd_per_month":"10.00","usd_per_second":"0.000004133598"},{"cpu_type":"SHARED","cpus":"1","memory_bytes":"2147483648","name":"Basic S","slug":"basic-s","tier_slug":"basic","tier_upgrade_to":"professional-s","usd_per_month":"20.00","usd_per_second":"0.000008267196"},{"cpu_type":"SHARED","cpus":"2","memory_bytes":"4294967296","name":"Basic M","slug":"basic-m","tier_slug":"basic","tier_upgrade_to":"professional-m","usd_per_month":"40.00","usd_per_second":"0.000016534392"},{"cpu_type":"SHARED","cpus":"1","memory_bytes":"1073741824","name":"Professional XS","slug":"professional-xs","tier_downgrade_to":"basic-xs","tier_slug":"professional","usd_per_month":"12.00","usd_per_second":"0.000004960317"},{"cpu_type":"SHARED","cpus":"1","memory_bytes":"2147483648","name":"Professional S","slug":"professional-s","tier_downgrade_to":"basic-s","tier_slug":"professional","usd_per_month":"25.00","usd_per_second":"0.000010333995"},{"cpu_type":"SHARED","cpus":"2","memory_bytes":"4294967296","name":"Professional M","slug":"professional-m","tier_downgrade_to":"basic-s","tier_slug":"professional","usd_per_month":"50.00","usd_per_second":"0.000020667989"},{"cpu_type":"DEDICATED","cpus":"1","memory_bytes":"4294967296","name":"Professional 1L","slug":"professional-1l","tier_downgrade_to":"basic-m","tier_slug":"professional","usd_per_month":"75.00","usd_per_second":"0.000031001984"},{"cpu_type":"DEDICATED","cpus":"2","memory_bytes":"8589934592","name":"Professional L","slug":"professional-l","tier_downgrade_to":"basic-s","tier_slug":"professional","usd_per_month":"150.00","usd_per_second":"0.000062003968"},{"cpu_type":"DEDICATED","cpus":"4","memory_bytes":"17179869184","name":"Professional XL","slug":"professional-xl","tier_downgrade_to":"basic-s","tier_slug":"professional","usd_per_month":"300.00","usd_per_second":"0.000124007937"}]}}},"schema":{"properties":{"discount_percent":{"example":2.32,"format":"float","type":"number"},"instance_sizes":{"items":{"properties":{"cpu_type":{"default":"UNSPECIFIED","enum":["UNSPECIFIED","SHARED","DEDICATED"],"example":"SHARED","title":"- SHARED: Shared vCPU cores\n - DEDICATED: Dedicated vCPU cores","type":"string"},"cpus":{"example":"3","format":"int64","title":"The number of allotted vCPU cores","type":"string"},"memory_bytes":{"example":"1048","format":"int64","title":"The allotted memory in bytes","type":"string"},"name":{"example":"name","title":"A human-readable name of the instance size","type":"string"},"slug":{"example":"basic","title":"The slug of the instance size","type":"string"},"tier_downgrade_to":{"example":"basic","title":"The slug of the corresponding downgradable instance size on the lower tier","type":"string"},"tier_slug":{"example":"basic","title":"The slug of the tier to which this instance size belongs","type":"string"},"tier_upgrade_to":{"example":"basic","title":"The slug of the corresponding upgradable instance size on the higher tier","type":"string"},"usd_per_month":{"example":"23","title":"The cost of this instance size in USD per month","type":"string"},"usd_per_second":{"example":"0.00000001232","title":"The cost of this instance size in USD per second","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"A JSON with key `instance_sizes`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Instance Sizes","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/tiers/instance_sizes\""}]}},"/v2/apps/tiers/instance_sizes/{slug}":{"get":{"description":"Retrieve information about a specific instance size for `service`, `worker`, and `job` components.","operationId":"apps_get_instanceSize","parameters":[{"description":"The slug of the instance size","example":"basic-xxs","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"instance_size":{"value":{"instance_size":{"cpu_type":"SHARED","cpus":"1","memory_bytes":"536870912","name":"Basic XXS","slug":"basic-xxs","tier_slug":"basic","tier_upgrade_to":"professional-xs","usd_per_month":"5.00","usd_per_second":"0.000002066799"}}}},"schema":{"properties":{"instance_size":{"$ref":"#/paths/~1v2~1apps~1tiers~1instance_sizes/get/responses/200/content/application~1json/schema/properties/instance_sizes/items"}},"type":"object"}}},"description":"A JSON with key `instance_size`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Instance Size","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/tiers/instance_sizes/{slug}\""}]}},"/v2/apps/tiers/{slug}":{"get":{"description":"Retrieve information about a specific app tier.","operationId":"apps_get_tier","parameters":[{"description":"The slug of the tier","example":"basic","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"tier":{"value":{"tier":{"build_seconds":"24000","egress_bandwidth_bytes":"42949672960","name":"Basic","slug":"basic"}}}},"schema":{"properties":{"tier":{"$ref":"#/paths/~1v2~1apps~1tiers/get/responses/200/content/application~1json/schema/properties/tiers/items"}},"type":"object"}}},"description":"A JSON with the key `tier`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an App Tier","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/tiers/{slug}\""}]}},"/v2/apps/{app_id}/alerts":{"get":{"description":"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.","operationId":"apps_list_alerts","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"examples":{"apps":{"value":{"alerts":[{"emails":["sammy@digitalocean.com"],"id":"e552e1f9-c1b0-4e6d-8777-ad6f27767306","phase":"ACTIVE","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.120Z","name":"alert-configure-insight-alert","started_at":"2025-08-15T13:52:28.120Z","status":"SUCCESS"}]},"spec":{"rule":"DEPLOYMENT_FAILED"}},{"emails":["sammy@digitalocean.com"],"id":"b58cc9d4-0702-4ffd-ab45-4c2a8d979527","phase":"ACTIVE","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.120Z","name":"alert-configure-insight-alert","started_at":"2025-08-15T13:52:28.120Z","status":"SUCCESS"}]},"spec":{"operator":"GREATER_THAN","rule":"CPU_UTILIZATION","value":85,"window":"FIVE_MINUTES"}}]}}},"schema":{"properties":{"alerts":{"items":{"properties":{"component_name":{"example":"backend","title":"Name of component the alert belongs to","type":"string"},"emails":{"example":["sammy@digitalocean.com"],"items":{"default":"","example":"sammy@digitalocean.com","type":"string"},"title":"Emails for alerts to go to","type":"array"},"id":{"example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","readOnly":true,"title":"The ID of the alert","type":"string"},"phase":{"default":"UNKNOWN","enum":["UNKNOWN","PENDING","CONFIGURING","ACTIVE","ERROR"],"example":"ACTIVE","type":"string"},"progress":{"properties":{"steps":{"items":{"properties":{"ended_at":{"example":"2025-08-15T13:52:28.120Z","format":"date-time","title":"The start time of this step","type":"string"},"name":{"example":"example_step","title":"The name of this step","type":"string"},"reason":{"properties":{"code":{"example":"Title of Error","title":"The error code","type":"string"},"message":{"example":"This is an error","title":"The error message","type":"string"}},"type":"object"},"started_at":{"example":"2025-08-15T13:52:28.120Z","format":"date-time","title":"The start time of this step","type":"string"},"status":{"default":"UNKNOWN","enum":["UNKNOWN","PENDING","RUNNING","ERROR","SUCCESS"],"example":"SUCCESS","type":"string"}},"type":"object"},"title":"Steps of an alert's progress.","type":"array"}},"type":"object"},"slack_webhooks":{"items":{"properties":{"channel":{"example":"Channel Name","title":"Name of the Slack Webhook Channel","type":"string"},"url":{"example":"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX","title":"URL of the Slack webhook","type":"string"}},"type":"object"},"title":"Slack Webhooks to send alerts to","type":"array"},"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec/properties/functions/items/properties/alerts/items"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"A JSON object with a `alerts` key. This is list of object `alerts`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List all app alerts","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/alerts\""}]}},"/v2/apps/{app_id}/alerts/{alert_id}/destinations":{"post":{"description":"Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app.","operationId":"apps_assign_alertDestinations","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"description":"The alert ID","example":"5a624ab5-dd58-4b39-b7dd-8b7c36e8a91d","in":"path","name":"alert_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"emails":{"example":["sammy@digitalocean.com"],"items":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1alerts/get/responses/200/content/application~1json/schema/properties/alerts/items/properties/emails/items"},"type":"array"},"slack_webhooks":{"items":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1alerts/get/responses/200/content/application~1json/schema/properties/alerts/items/properties/slack_webhooks/items"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"apps":{"value":{"alert":{"emails":["sammy@digitalocean.com"],"id":"e552e1f9-c1b0-4e6d-8777-ad6f27767306","phase":"ACTIVE","progress":{"steps":[{"ended_at":"2025-08-15T13:52:28.120Z","name":"alert-configure-insight-alert","started_at":"2025-08-15T13:52:28.120Z","status":"SUCCESS"}]},"spec":{"rule":"DEPLOYMENT_FAILED"}}}}},"schema":{"properties":{"alert":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1alerts/get/responses/200/content/application~1json/schema/properties/alerts/items"}},"type":"object"}}},"description":"A JSON object with an `alert` key. This is an object of type `alert`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update destinations for alerts","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{id}/alerts/{alert_id}/destinations\""}]}},"/v2/apps/{app_id}/components/{component_name}/logs":{"get":{"description":"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.","operationId":"apps_get_logs_active_deployment","parameters":[{"description":"The app ID","example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","in":"path","name":"app_id","required":true,"schema":{"type":"string"}},{"description":"An optional component name. If set, logs will be limited to this component only.","example":"component","in":"path","name":"component_name","required":true,"schema":{"type":"string"}},{"description":"Whether the logs should follow live updates.","example":true,"in":"query","name":"follow","schema":{"type":"boolean"}},{"description":"The type of logs to retrieve\n- BUILD: Build-time logs\n- DEPLOY: Deploy-time logs\n- RUN: Live run-time logs","example":"BUILD","in":"query","name":"type","required":true,"schema":{"default":"UNSPECIFIED","enum":["UNSPECIFIED","BUILD","DEPLOY","RUN"],"type":"string"}},{"description":"An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`.","example":"3m","in":"query","name":"pod_connection_timeout","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"logs":{"value":{"historic_logs":["https://logs-example/archive/build.log"],"live_url":"https://logs-example/build.log","url":"https://logs/build.log"}}},"schema":{"properties":{"historic_urls":{"items":{"example":"https://logs/build.log","type":"string"},"title":"A list of URLs to archived log files","type":"array"},"live_url":{"description":"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.","example":"ws://logs/build","type":"string"}},"type":"object"}}},"description":"A JSON object with urls that point to archived logs","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Active Deployment Logs","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/components/{component_name}/logs\""}]}},"/v2/apps/{app_id}/deployments":{"get":{"description":"List all deployments of an app.","operationId":"apps_list_deployments","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"examples":{"deployments":{"value":{"deployments":[{"cause":"commit 9a4df0b pushed to github/digitalocean/sample-golang","created_at":"2025-08-15T13:52:28.120Z","id":"b6bdf840-2854-4f87-a36c-5f231c617c84","phase":"PENDING_BUILD","phase_last_updated_at":"2025-08-15T13:52:28.120Z","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":{"name":"sample-golang","region":"ams","services":[{"environment_slug":"go","github":{"branch":"branch","repo":"digitalocean/sample-golang"},"instance_count":2,"instance_size_slug":"basic-xxs","name":"web","routes":[{"path":"/"}],"run_command":"bin/sample-golang"}]},"tier_slug":"basic","updated_at":"2025-08-15T13:52:28.120Z"}],"links":{"pages":{}},"meta":{"total":1}}}},"schema":{"allOf":[{"properties":{"deployments":{"items":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment"},"title":"A list of deployments","type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with a `deployments` key. This will be a list of all app deployments","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List App Deployments","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments\""}]},"post":{"description":"Creating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app.","operationId":"apps_create_deployment","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"force_build":{"example":true,"title":"Indicates whether to force a build of app from source even if an existing cached build is suitable for re-use","type":"boolean"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"deployment":{"value":{"deployment":{"cause":"commit 9a4df0b pushed to github/digitalocean/sample-golang","created_at":"2025-08-15T13:52:28.120Z","id":"b6bdf840-2854-4f87-a36c-5f231c617c84","phase":"PENDING_BUILD","phase_last_updated_at":"2025-08-15T13:52:28.120Z","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":{"name":"sample-golang","region":"ams","services":[{"environment_slug":"go","github":{"branch":"branch","repo":"digitalocean/sample-golang"},"instance_count":2,"instance_size_slug":"basic-xxs","name":"web","routes":[{"path":"/"}],"run_command":"bin/sample-golang"}]},"tier_slug":"basic","updated_at":"2025-08-15T13:52:28.121Z"}}}},"schema":{"properties":{"deployment":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment"}},"type":"object"}}},"description":"A JSON object with a `deployment` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create an App Deployment","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments\""}]}},"/v2/apps/{app_id}/deployments/{deployment_id}":{"get":{"description":"Retrieve information about an app deployment.","operationId":"apps_get_deployment","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"description":"The deployment ID","example":"3aa4d20e-5527-4c00-b496-601fbd22520a","in":"path","name":"deployment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"deployment":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200/content/application~1json/examples/deployment"}},"schema":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200/content/application~1json/schema"}}},"description":"A JSON of the requested deployment","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an App Deployment","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}\""}]}},"/v2/apps/{app_id}/deployments/{deployment_id}/cancel":{"post":{"description":"Immediately cancel an in-progress deployment.","operationId":"apps_cancel_deployment","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments~1%7Bdeployment_id%7D/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"deployment":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200/content/application~1json/examples/deployment"}},"schema":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200/content/application~1json/schema"}}},"description":"A JSON the `deployment` that was just cancelled.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Cancel a Deployment","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/cancel\""}]}},"/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs":{"get":{"description":"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.","operationId":"apps_get_logs","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments~1%7Bdeployment_id%7D/get/parameters/1"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/1"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/2"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/3"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Deployment Logs","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs\""}]}},"/v2/apps/{app_id}/deployments/{deployment_id}/logs":{"get":{"description":"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.","operationId":"apps_get_logs_aggregate","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments~1%7Bdeployment_id%7D/get/parameters/1"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/2"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/3"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Aggregate Deployment Logs","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/logs\""}]}},"/v2/apps/{app_id}/logs":{"get":{"description":"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.","operationId":"apps_get_logs_active_deployment_aggregate","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/2"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/3"},{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Active Deployment Aggregate Logs","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/logs\""}]}},"/v2/apps/{app_id}/metrics/bandwidth_daily":{"get":{"description":"Retrieve daily bandwidth usage metrics for a single app.","operationId":"apps_get_metrics_bandwidth_daily","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"},{"description":"Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday.","example":"2025-08-15T13:52:28.121Z","in":"query","name":"date","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"app_bandwidth_usage":{"value":{"app_bandwidth_usage":[{"app_id":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","bandwidth_bytes":"513668"}],"date":"2025-08-15T13:52:28.121Z"}}},"schema":{"properties":{"app_bandwidth_usage":{"description":"A list of bandwidth usage details by app.","items":{"description":"Bandwidth usage for an app.","properties":{"app_id":{"description":"The ID of the app.","example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","type":"string"},"bandwidth_bytes":{"description":"The used bandwidth amount in bytes.","example":"513668","format":"uint64","type":"string"}},"type":"object"},"type":"array"},"date":{"description":"The date for the metrics data.","example":"2025-08-15T13:52:28.121Z","format":"date-time","type":"string"}},"type":"object"}}},"description":"A JSON object with a `app_bandwidth_usage` key","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve App Daily Bandwidth Metrics","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{id}/metrics/bandwidth_daily\""}]}},"/v2/apps/{app_id}/rollback":{"post":{"description":"Rollback an app to a previous deployment. A new deployment will be created to perform the rollback.\nThe app will be pinned to the rollback deployment preventing any new deployments from being created,\neither manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be\neither committed or reverted.\n\nIt is recommended to use the Validate App Rollback endpoint to double check if the rollback is\nvalid and if there are any warnings.\n","operationId":"apps_create_rollback","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deployment_id":{"description":"The ID of the deployment to rollback to.","example":"3aa4d20e-5527-4c00-b496-601fbd22520a","type":"string"},"skip_pin":{"description":"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.","example":false,"type":"boolean"}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Rollback App","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{ \"deployment_id\": \"3aa4d20e-5527-4c00-b496-601fbd22520a\" }' \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/rollback\""}]}},"/v2/apps/{app_id}/rollback/commit":{"post":{"description":"Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments.\n","operationId":"apps_commit_rollback","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"responses":{"200":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Commit App Rollback","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/rollback/commit\""}]}},"/v2/apps/{app_id}/rollback/revert":{"post":{"description":"Revert an app rollback. This action reverts the active rollback by creating a new deployment from the\nlatest app spec prior to the rollback and unpins the app to resume new deployments.\n","operationId":"apps_revert_rollback","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"responses":{"200":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1deployments/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Revert App Rollback","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/rollback/revert\""}]}},"/v2/apps/{app_id}/rollback/validate":{"post":{"description":"Check whether an app can be rolled back to a specific deployment. This endpoint can also be used\nto check if there are any warnings or validation conditions that will cause the rollback to proceed\nunder unideal circumstances. For example, if a component must be rebuilt as part of the rollback\ncausing it to take longer than usual.\n","operationId":"apps_validate_rollback","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1components~1%7Bcomponent_name%7D~1logs/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1rollback/post/requestBody/content/application~1json/schema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"Invalid rollback":{"value":{"error":{"code":"incompatible_result","message":"deployment result \"failed\" is unsuitable for rollback"},"valid":false}},"Valid rollback":{"value":{"valid":true}},"Valid rollback with warnings":{"value":{"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"}]}}},"schema":{"properties":{"error":{"allOf":[{"description":"Contains the failing condition that is causing the rollback to be invalid."},{"properties":{"code":{"description":"A code identifier that represents the failing condition.\n\nFailing conditions:\n  - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback.\n  - `incompatible_result` - indicates that the deployment's result is not suitable for rollback.\n  - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier.\n  - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned.\n  - `database_config_conflict` - indicates that the deployment's database config is different than the current config.\n  - `region_conflict` - indicates that the deployment's region differs from the current app region.\n  \nWarning conditions:\n  - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild.\n  - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest.\n","enum":["incompatible_phase","incompatible_result","exceeded_revision_limit","app_pinned","database_config_conflict","region_conflict","static_site_requires_rebuild","image_source_missing_digest"],"example":"exceeded_revision_limit","type":"string"},"components":{"example":["www"],"items":{"description":"If applicable, a list of components that are failing the condition.","type":"string"},"type":"array"},"message":{"description":"A human-readable message describing the failing condition.","example":"the deployment is past the maximum historical revision limit of 0 for the \"starter\" app tier","type":"string"}},"type":"object"}]},"valid":{"description":"Indicates whether the app can be rolled back to the specified deployment.","type":"boolean"},"warnings":{"description":"Contains a list of warnings that may cause the rollback to run under unideal circumstances.","items":{"$ref":"#/paths/~1v2~1apps~1%7Bapp_id%7D~1rollback~1validate/post/responses/200/content/application~1json/schema/properties/error/allOf/1"},"type":"array"}},"type":"object"}}},"description":"A JSON object with the validation results.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Validate App Rollback","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{ \"deployment_id\": \"3aa4d20e-5527-4c00-b496-601fbd22520a\" }' \\\n  \"https://api.digitalocean.com/v2/apps/{app_id}/rollback/validate\""}]}},"/v2/apps/{id}":{"delete":{"description":"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.","operationId":"apps_delete","parameters":[{"description":"The ID of the app","example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"b7d64052-3706-4cb7-b21a-c5a2f44e63b3"},"schema":{"properties":{"id":{"example":"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","title":"The ID of the app that was deleted","type":"string"}},"type":"object"}}},"description":"the ID of the app deleted.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an App","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{id}\""}]},"get":{"description":"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.","operationId":"apps_get","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bid%7D/delete/parameters/0"},{"description":"The name of the app to retrieve.","example":"myApp","in":"query","name":"name","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"app":{"$ref":"#/paths/~1v2~1apps/post/responses/200/content/application~1json/examples/app"}},"schema":{"$ref":"#/paths/~1v2~1apps/post/responses/200/content/application~1json/schema"}}},"description":"A JSON with key `app`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing App","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{id}\""}]},"put":{"description":"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/).","operationId":"apps_update","parameters":[{"$ref":"#/paths/~1v2~1apps~1%7Bid%7D/delete/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"spec":{"$ref":"#/paths/~1v2~1apps/get/responses/200/content/application~1json/schema/allOf/0/properties/apps/items/properties/active_deployment/properties/spec"}},"required":["spec"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"app":{"$ref":"#/paths/~1v2~1apps/post/responses/200/content/application~1json/examples/app"}},"schema":{"$ref":"#/paths/~1v2~1apps/post/responses/200/content/application~1json/schema"}}},"description":"A JSON object of the updated `app`","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update an App","tags":["Apps"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/apps/{id}\""}]}},"/v2/cdn/endpoints":{"get":{"description":"To list all of the CDN endpoints available on your account, send a GET request to `/v2/cdn/endpoints`.","operationId":"cdn_list_endpoints","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"endpoints":{"items":{"properties":{"certificate_id":{"description":"The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.","example":"892071a0-bb95-49bc-8021-3afd67a210bf","format":"uuid","type":"string"},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created.","example":"2025-08-15T13:52:28.121Z","format":"date-time","readOnly":true,"type":"string"},"custom_domain":{"description":"The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.","example":"static.example.com","format":"hostname","type":"string"},"endpoint":{"description":"The fully qualified domain name (FQDN) from which the CDN-backed content is served.","example":"static-images.nyc3.cdn.digitaloceanspaces.com","format":"hostname","readOnly":true,"type":"string"},"id":{"description":"A unique ID that can be used to identify and reference a CDN endpoint.","example":"892071a0-bb95-49bc-8021-3afd67a210bf","format":"uuid","readOnly":true,"type":"string"},"origin":{"description":"The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space.","example":"static-images.nyc3.digitaloceanspaces.com","format":"hostname","type":"string"},"ttl":{"default":3600,"description":"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.","enum":[60,600,3600,86400,604800],"example":3600,"type":"integer"}},"required":["origin"],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"endpoints":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","created_at":"2025-08-15T13:52:28.121Z","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}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All CDN Endpoints","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/cdn/endpoints\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    cdns, _, err := client.CDNs.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncdns = client.cdns.all\ncdns.each"}]},"post":{"description":"To create a new CDN endpoint, send a POST request to `/v2/cdn/endpoints`. The\norigin attribute must be set to the fully qualified domain name (FQDN) of a\nDigitalOcean Space. Optionally, the TTL may be configured by setting the `ttl`\nattribute.\n\nA custom subdomain may be configured by specifying the `custom_domain` and\n`certificate_id` attributes.\n","operationId":"cdn_create_endpoint","requestBody":{"content":{"application/json":{"examples":{"CDN Endpoint":{"value":{"origin":"static-images.nyc3.digitaloceanspaces.com","ttl":3600}},"CDN Endpoint With Custom Domain":{"value":{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","custom_domain":"static.example.com","origin":"static-images.nyc3.digitaloceanspaces.com","ttl":3600}}},"schema":{"$ref":"#/paths/~1v2~1cdn~1endpoints/get/responses/200/content/application~1json/schema/allOf/0/properties/endpoints/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"CDN Endpoint":{"value":{"endpoint":{"created_at":"2025-08-15T13:52:28.121Z","endpoint":"static-images.nyc3.cdn.digitaloceanspaces.com","id":"19f06b6a-3ace-4315-b086-499a0e521b76","origin":"static-images.nyc3.digitaloceanspaces.com","ttl":3600}}},"CDN Endpoint With Custom Domain":{"value":{"endpoint":{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","created_at":"2025-08-15T13:52:28.121Z","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}}}},"schema":{"properties":{"endpoint":{"$ref":"#/paths/~1v2~1cdn~1endpoints/get/responses/200/content/application~1json/schema/allOf/0/properties/endpoints/items"}}}}},"description":"The response will be a JSON object with an `endpoint` key. This will be set to an object containing the standard CDN endpoint attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New CDN Endpoint","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"origin\": \"static-images.nyc3.digitaloceanspaces.com\",\"certificate_id\": \"892071a0-bb95-49bc-8021-3afd67a210bf\",\"custom_domain\": \"static.example.com\",\"ttl\": 3600}' \\\n  \"https://api.digitalocean.com/v2/cdn/endpoints\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.CDNCreateRequest{\n        Origin:        \"static-images.nyc3.digitaloceanspaces.com\",\n        TTL:           3600,\n        CustomDomain:  \"static.example.com\",\n        CertificateID: \"892071a0-bb95-49bc-8021-3afd67a210b\",\n    }\n\n    cdn, _, err := client.CDNs.Create(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncdn = DropletKit::CDN.new(\n  origin: 'static-images.nyc3.digitaloceanspaces.com',\n  custom_domain: 'static.example.com',\n  certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf',\n  ttl: 3600\n)\n\nclient.cdns.create(cdn)"}]}},"/v2/cdn/endpoints/{cdn_id}":{"delete":{"description":"To delete a specific CDN endpoint, send a DELETE request to\n`/v2/cdn/endpoints/$ENDPOINT_ID`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n","operationId":"cdn_delete_endpoint","parameters":[{"$ref":"#/paths/~1v2~1cdn~1endpoints~1%7Bcdn_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a CDN Endpoint","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.CDNs.Delete(ctx, \"19f06b6a-3ace-4315-b086-499a0e521b76\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.cdns.delete(id: '19f06b6a-3ace-4315-b086-499a0e521b76')"}]},"get":{"description":"To show information about an existing CDN endpoint, send a GET request to `/v2/cdn/endpoints/$ENDPOINT_ID`.","operationId":"cdn_get_endpoint","parameters":[{"description":"A unique identifier for a CDN endpoint.","example":"19f06b6a-3ace-4315-b086-499a0e521b76","in":"path","name":"cdn_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1cdn~1endpoints/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing CDN Endpoint","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    cdn, _, err := client.CDNs.Get(ctx, \"19f06b6a-3ace-4315-b086-499a0e521b76\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.cdns.find(id: '19f06b6a-3ace-4315-b086-499a0e521b76')"}]},"put":{"description":"To update the TTL, certificate ID, or the FQDN of the custom subdomain for\nan existing CDN endpoint, send a PUT request to\n`/v2/cdn/endpoints/$ENDPOINT_ID`.\n","operationId":"cdn_update_endpoints","parameters":[{"$ref":"#/paths/~1v2~1cdn~1endpoints~1%7Bcdn_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"certificate_id":{"description":"The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.","example":"892071a0-bb95-49bc-8021-3afd67a210bf","format":"uuid","type":"string"},"custom_domain":{"description":"The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.","example":"static.example.com","format":"hostname","type":"string"},"ttl":{"default":3600,"description":"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.","enum":[60,600,3600,86400,604800],"example":3600,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1cdn~1endpoints/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a CDN Endpoint","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"ttl\": 1800}' \\\n\"https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    updateRequest := &godo.CDNUpdateTTLRequest{TTL: 1800}\n    cdn, _, err := client.CDNs.UpdateTTL(ctx, \"19f06b6a-3ace-4315-b086-499a0e521b76\", updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = '16f79fc8cd5adcfe528a0994311fa63cc877737b385b6ff7d12ed6684ba4fef5'\nclient = DropletKit::Client.new(access_token: token)\n\nclient.cdns.update_ttl(id: '19f06b6a-3ace-4315-b086-499a0e521b76', ttl: 1800)"}]}},"/v2/cdn/endpoints/{cdn_id}/cache":{"delete":{"description":"To purge cached content from a CDN endpoint, send a DELETE request to\n`/v2/cdn/endpoints/$ENDPOINT_ID/cache`. The body of the request should include\na `files` attribute containing a list of cached file paths to be purged. A\npath may be for a single file or may contain a wildcard (`*`) to recursively\npurge all files under a directory. When only a wildcard is provided, all\ncached files will be purged. There is a rate limit of 50 files per 20 seconds \nthat can be purged.\n","operationId":"cdn_purge_cache","parameters":[{"$ref":"#/paths/~1v2~1cdn~1endpoints~1%7Bcdn_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"files":{"description":"An array of strings containing the path to the content to be purged from the CDN cache.","example":["path/to/image.png","path/to/css/*"],"items":{"type":"string"},"type":"array"}},"required":["files"],"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Purge the Cache for an Existing CDN Endpoint","tags":["CDN Endpoints"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"files\": [\"assets/img/hero.png\",\"assets/css/*\"]}' \\\n  \"https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76/cache\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    flushRequest := &godo.CDNFlushCacheRequest{\n        Files: []string{\"assets/img/hero.png\",\"assets/css/*\"},\n    }\n\n    _, err := client.CDNs.FlushCache(ctx, \"19f06b6a-3ace-4315-b086-499a0e521b76\", flushRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.cdns.flush_cache(\n  id: '19f06b6a-3ace-4315-b086-499a0e521b76',\n  files: ['assets/img/hero.png','assets/css/*']\n)"}]}},"/v2/certificates":{"get":{"description":"To list all of the certificates available on your account, send a GET request to `/v2/certificates`.","operationId":"certificates_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"AllCertificates":{"value":{"certificates":[{"created_at":"2025-08-15T13:52:28.121Z","dns_names":[""],"id":"892071a0-bb95-49bc-8021-3afd67a210bf","name":"web-cert-01","not_after":"2025-08-15T13:52:28.121Z","sha1_fingerprint":"dfcc9f57d86bf58e321c2c6c31c7a971be244ac7","state":"verified","type":"custom"},{"created_at":"2025-08-15T13:52:28.121Z","dns_names":["www.example.com","example.com"],"id":"ba9b9c18-6c59-46c2-99df-70da170a42ba","name":"web-cert-02","not_after":"2025-08-15T13:52:28.121Z","sha1_fingerprint":"479c82b5c63cb6d3e6fac4624d58a33b267e166c","state":"verified","type":"lets_encrypt"}],"links":{},"meta":{"total":2}}}},"schema":{"allOf":[{"properties":{"certificates":{"items":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the certificate was created.","example":"2025-08-15T13:52:28.121Z","format":"date-time","readOnly":true,"type":"string"},"dns_names":{"description":"An array of fully qualified domain names (FQDNs) for which the certificate was issued.","example":["www.example.com","example.com"],"items":{"type":"string"},"type":"array"},"id":{"description":"A unique ID that can be used to identify and reference a certificate.","example":"892071a0-bb95-49bc-8021-3afd67a210bf","format":"uuid","readOnly":true,"type":"string"},"name":{"description":"A unique human-readable name referring to a certificate.","example":"web-cert-01","type":"string"},"not_after":{"description":"A time value given in ISO8601 combined date and time format that represents the certificate's expiration date.","example":"2025-08-15T13:52:28.121Z","format":"date-time","readOnly":true,"type":"string"},"sha1_fingerprint":{"description":"A unique identifier generated from the SHA-1 fingerprint of the certificate.","example":"dfcc9f57d86bf58e321c2c6c31c7a971be244ac7","readOnly":true,"type":"string"},"state":{"description":"A string representing the current state of the certificate. It may be `pending`, `verified`, or `error`.","enum":["pending","verified","error"],"example":"verified","readOnly":true,"type":"string"},"type":{"description":"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.","enum":["custom","lets_encrypt"],"example":"lets_encrypt","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Certificates","tags":["Certificates"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/certificates\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    certs, _, err := client.Certificates.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncertificates = client.certificates.all\ncertificates.each"}]},"post":{"description":"To upload new SSL certificate which you have previously generated, send a POST\nrequest to `/v2/certificates`.\n\nWhen uploading a user-generated certificate, the `private_key`,\n`leaf_certificate`, and optionally the `certificate_chain` attributes should\nbe provided. The type must be set to `custom`.\n\nWhen using Let's Encrypt to create a certificate, the `dns_names` attribute\nmust be provided, and the type must be set to `lets_encrypt`.\n","operationId":"certificates_create","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"properties":{"name":{"description":"A unique human-readable name referring to a certificate.","example":"web-cert-01","type":"string"},"type":{"description":"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.","enum":["custom","lets_encrypt"],"example":"lets_encrypt","type":"string"}},"required":["name"],"type":"object"},{"properties":{"dns_names":{"description":"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`).","example":["www.example.com","example.com"],"items":{"type":"string"},"type":"array"}},"required":["dns_names"],"type":"object"}],"title":"Let's Encrypt Certificate Request"},{"allOf":[{"$ref":"#/paths/~1v2~1certificates/post/requestBody/content/application~1json/schema/oneOf/0/allOf/0"},{"properties":{"certificate_chain":{"description":"The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate.","example":"-----BEGIN CERTIFICATE-----\nMIIFFjCCA/6gAwIBAgISA0AznUJmXhu08/89ZuSPC/kRMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xNjExMjQwMDIzMDBaFw0x\nNzAyMjIwMDIzMDBaMCQxIjAgBgNVBAMTGWNsb3VkLmFuZHJld3NvbWV0aGluZy5j\nb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBIZMz7tnK6V52SVf+\nCYssOfCQHAx5f0Ou5rYbq3xNh8VHAIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1DwGb\n8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86XwrE4\noFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3wZ2mz\nZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1FZRna\nk/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFXfqqb\nQwuRAgMBAAGjggIaMIICFjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB\nBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLsAFcxAhFX1\nMbCnzr9hEO5rL4jqMB8GA1UdIwQYMBaAFKhKamMEfd265tE5t6ZFZe/zqOyhMHAG\nCCsGAQUFBwEBBGQwYjAvBggrBgEFBQcwAYYjaHR0cDovL29jc3AuaW50LXgzLmxl\ndHNlbmNyeXB0Lm9yZy8wLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5s\nZXRzZW5jcnlwdC5vcmcvMCQGA1UdEQQdMBuCGWNsb3VkLmFuZHJld3NvbWV0aGlu\nZy5jb20wgf4GA1UdIASB9jCB8zAIBgZngQwBAgEwgeWECysGAQQBgt8TAQEBMIHW\nMCYGCCsGAQUFBwIBFhpodHRwOi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCBqwYIKwYB\nBQUHAgIwgZ4MgZtUaGlzIENlcnRpZmljYXRlIG1heSBvbmx5IGJlIHJlbGllZCB1\ncG9uIGJ5IFJlbHlpbmcgUGFydGllcyBhbmQgb25seSQ2ziBhY2NvcmRhbmNlIHdp\ndGggdGhlIENlcnRpZmljYXRlIFBvbGljeSBmb3VuZCBhdCBsdHRwczovL2xldHNl\nbmNyeXB0Lm9yZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAOZVQvrjM\nPKXLARTjB5XsgfyDN3/qwLl7SmwGkPe+B+9FJpfScYG1JzVuCj/SoaPaK34G4x/e\niXwlwOXtMOtqjQYzNu2Pr2C+I+rVmaxIrCUXFmC205IMuUBEeWXG9Y/HvXQLPabD\nD3Gdl5+Feink9SDRP7G0HaAwq13hI7ARxkL3o+UIY39X0dV3WOboW2Re8nrkFXJ7\nq9Z6shK5QgpBfsLjtjNsQzaGV3ve1gOg25aTJGearBWOvEjJNA1wGMoKVXOtYwm/\nWyWoVdCQ8HmconcbJB6xc0UZ1EjvzRr5ZIvSa5uHZD0L3m7/kpPWlAlFJ7hHASPu\nUlF1zblDmg2Iaw==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\nSjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\nGkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAnNMM8FrlLsd3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\nq6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\nSMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\nZ8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA\na6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj\n/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIPOIUo4IBfTCCAXkwEgYDVR0T\nAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG\nCCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv\nbTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k\nc3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw\nVAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC\nARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz\nMDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu\nY3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF\nAAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo\nuM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/\nwApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu\nX4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG\nPfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----","type":"string"},"leaf_certificate":{"description":"The contents of a PEM-formatted public SSL certificate.","example":"-----BEGIN CERTIFICATE-----\nMIIFFjCCA/6gAwIBAgISA0AznUJmXhu08/89ZuSPC/kRMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xNjExMjQwMDIzMDBaFw0x\nNzAyMjIwMDIzMDBaMCQxIjAgBgNVBAMTGWNsb3VkLmFuZHJld3NvbWV0aGluZy5j\nb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBIZMz8pnK6V52SVf+\nCYssOfCQHAx5f0Ou5rYbq3xNh8VWHIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1DwGb\n8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86XwrE4\noFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3wZ2mz\nZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1FZRna\nk/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFXfqqb\nQwuRAgMBAAGjggIaMIICFjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB\nBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLsAFcxAhFX1\nMbCnzr9hEO5rL4jqMB8GA1UdIwQYMBaAFKhKamMEfd265tE5t6ZFZe/zqOyhMHAG\nCCsGAQUFBwEBBGQwYjAvBggrBgEFBQcwAYYjaHR0cDovL29jc3AuaW50LXgzLmxl\ndHNlbmNyeXB0Lm9yZy8wLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5s\nZXRzZW5jcnlwdC5vcmcvMCQGA1UdEQQdMBuCGWNsb3VkLmFuZHJld3NvbWV0aGlu\nZy5jb20wgf4GA1UdIASB9jCB8zAIBgZngQwBAgWrgeYGCysGAQQBgt8TAQEBMIHW\nMCYGCCsGAQUFBwIBFhpodHRwOi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCBqwYIKwYB\nBQUHAgIwgZ4MgZtUaGlzIENlcnRpZmljYXRlIG1heSBvbmx5IGJlIHJlbGllZCB1\ncG9uIGJ5IFJlbHlpbmcgUGFydGllcyBhbmQgb25seSQ2ziBhY2NvcmRhbmNlIHdp\ndGggdGhlIENlcnRpZmljYXRlIFBvbGljeSBmb3VuZCBhdCBodHRwczovL2xldHNl\nbmNyeXB0Lm9yZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAOZVQvrjM\nPKXLARTjB5XsgfyDN3/qwLl7SmwGkPe+B+9FJpfScYG1JzVuCj/SoaPaK34G4x/e\niXwlwOXtMOtqjQYzNu2Pr2C+I+rVmaxIrCUXFmC205IMuUBEeWXG9Y/HvXQLPabD\nD3Gdl5+Feink9SDRP7G0HaAwq13hI7ARxkL9p+UIY39X0dV3WOboW2Re8nrkFXJ7\nq9Z6shK5QgpBfsLjtjNsQzaGV3ve1gOg25aTJGearBWOvEjJNA1wGMoKVXOtYwm/\nWyWoVdCQ8HmconcbJB6xc0UZ1EjvzRr5ZIvSa5uHZD0L3m7/kpPWlAlFJ7hHASPu\nUlF1zblDmg2Iaw==\n-----END CERTIFICATE-----","type":"string"},"private_key":{"description":"The contents of a PEM-formatted private-key corresponding to the SSL certificate.","example":"-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBIZMz8pnK6V52\nSVf+CYssOfCQHAx5f0Ou5rYbq3xNh8VHAIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1\nDwGb8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86X\nwrE4oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3w\nZ2mzZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1F\nZRnak/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFX\nfqqbQwuRAgMBAAECggEBAILLmkW0JzOkmLTDNzR0giyRkLoIROqDpfLtjKdwm95l\n9NUBJcU4vCvXQITKt/NhtnNTexcowg8pInb0ksJpg3UGE+4oMNBXVi2UW5MQZ5cm\ncVkQqgXkBF2YAY8FMaB6EML+0En2+dGR/3gIAr221xsFiXe1kHbB8Nb2c/d5HpFt\neRpLVJnK+TxSr78PcZA8DDGlSgwvgimdAaFUNO2OqB9/0E9UPyKk2ycdff/Z6ldF\n0hkCLtdYTTl8Kf/OwjcuTgmA2O3Y8/CoQX/L+oP9Rvt9pWCEfuebiOmHJVPO6Y6x\ngtQVEXwmF1pDHH4Qtz/e6UZTdYeMl9G4aNO2CawwcaYECgYEA57imgSOG4XsJLRh\nGGncV9R/xhy4AbDWLtAMzQRX4ktvKCaHWyQV2XK2we/cu29NLv2Y89WmerTNPOU+\nP8+pB31uty2ELySVn15QhKpQClVEAlxCnnNjXYrii5LOM80+lVmxvQwxVd8Yz8nj\nIntyioXNBEnYS7V2RxxFGgFun1cCgYEA1V3W+Uyamhq8JS5EY0FhyGcXdHd70K49\nW1ou7McIpncf9tM9acLS1hkI98rd2T69Zo8mKoV1V2hjFaKUYfNys6tTkYWeZCcJ\n3rW44j9DTD+FmmjcX6b8DzfybGLehfNbCw6n67/r45DXIV/fk6XZfkx6IEGO4ODt\nNfnvx4TuI1cCgYBACDiKqwSUvmkUuweOo4IuCxyb5Ee8v98P5JIE/VRDxlCbKbpx\npxEam6aBBQVcDi+n8o0H3WjjlKc6UqbW/01YMoMrvzotxNBLz8Y0QtQHZvR6KoCG\nRKCKstxTcWflzKuknbqN4RapAhNbKBDJ8PMSWfyDWNyaXzSmBdvaidbF1QKBgDI0\no4oD0Xkjg1QIYAUu9FBQmb9JAjRnW36saNBEQS/SZg4RRKknM683MtoDvVIKJk0E\nsAlfX+4SXQZRPDMUMtA+Jyrd0xhj6zmhbwClvDMr20crF3fWdgcqtft1BEFmsuyW\nJUMe5OWmRkjPI2+9ncDPRAllA7a8lnSV/Crph5N/AoGBAIK249temKrGe9pmsmAo\nQbNuYSmwpnMoAqdHTrl70HEmK7ob6SIVmsR8QFAkH7xkYZc4Bxbx4h1bdpozGB+/\nAangbiaYJcAOD1QyfiFbflvI1RFeHgrk7VIafeSeQv6qu0LLMi2zUbpgVzxt78Wg\neTuK2xNR0PIM8OI7pRpgyj1I\n-----END PRIVATE KEY-----","type":"string"}},"required":["private_key","leaf_certificate"],"type":"object"}],"title":"Custom Certificate Request"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"Custom Certificate":{"value":{"certificate":{"created_at":"2025-08-15T13:52:28.122Z","dns_names":[""],"id":"892071a0-bb95-49bc-8021-3afd67a210bf","name":"web-cert-01","not_after":"2025-08-15T13:52:28.122Z","sha1_fingerprint":"dfcc9f57d86bf58e321c2c6c31c7a971be244ac7","state":"verified","type":"custom"}}},"Let's Encrypt Certificate":{"value":{"certificate":{"created_at":"2025-08-15T13:52:28.122Z","dns_names":["www.example.com","example.com"],"id":"ba9b9c18-6c59-46c2-99df-70da170a42ba","name":"web-cert-02","not_after":"2025-08-15T13:52:28.122Z","sha1_fingerprint":"479c82b5c63cb6d3e6fac4624d58a33b267e166c","state":"pending","type":"lets_encrypt"}}}},"schema":{"properties":{"certificate":{"$ref":"#/paths/~1v2~1certificates/get/responses/200/content/application~1json/schema/allOf/0/properties/certificates/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `certificate`. The value of this will be an object that contains the standard attributes associated with a certificate.\nWhen using Let's Encrypt, the initial value of the certificate's `state` attribute will be `pending`. When the certificate has been successfully issued by Let's Encrypt, this will transition to `verified` and be ready for use.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Certificate","tags":["Certificates"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"web-cert-01\", \"type\": \"custom\", \"private_key\": \"'\"$(</path/to/privkey1.pem)\"'\",\"leaf_certificate\": \"'\"$(</path/to/cert1.pem)\"'\",\"certificate_chain\": \"'\"$(</path/to/fullchain1.pem)\"'\"}' \\\n  \"https://api.digitalocean.com/v2/certificates\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    key, err := ioutil.ReadFile(\"/path/to/privkey1.pem\")\n    if err != nil {\n        fmt.Print(err)\n    }\n\n    cert, err := ioutil.ReadFile(\"/path/to/cert1.pem\")\n    if err != nil {\n        fmt.Print(err)\n    }\n\n    chain, err := ioutil.ReadFile(\"/path/to/fullchain1.pem\")\n    if err != nil {\n        fmt.Print(err)\n    }\n\n    createRequest := &godo.CertificateRequest{\n        Name:             \"web-cert-01\",\n        PrivateKey:       string(key),\n        LeafCertificate:  string(cert),\n        CertificateChain: string(chain),\n        Type:             \"custom\",\n    }\n\n    certObj, _, err := client.Certificates.Create(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nkey = File.open('/path/to/privkey1.pem', 'r'){ |file| file.read }\ncert = File.open('/path/to/cert1.pem', 'r'){ |file| file.read }\nchain = File.open('/path/to/fullchain1.pem', 'r'){ |file| file.read }\n\ncertificate = DropletKit::Certificate.new(\n    name: 'web-cert-01',\n    private_key: key,\n    leaf_certificate: cert,\n    certificate_chain: chain,\n    type: 'custom'\n)\n\nclient.certificates.create(certificate)"}]}},"/v2/certificates/{certificate_id}":{"delete":{"description":"To delete a specific certificate, send a DELETE request to\n`/v2/certificates/$CERTIFICATE_ID`.\n","operationId":"certificates_delete","parameters":[{"$ref":"#/paths/~1v2~1certificates~1%7Bcertificate_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Certificate","tags":["Certificates"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/certificates/892071a0-bb95-49bc-8021-3afd67a210bf\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Certificates.Delete(ctx, \"892071a0-bb95-49bc-8021-3afd67a210bf\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.certificates.delete(id: '892071a0-bb95-49bc-8021-3afd67a210bf')"}]},"get":{"description":"To show information about an existing certificate, send a GET request to `/v2/certificates/$CERTIFICATE_ID`.","operationId":"certificates_get","parameters":[{"description":"A unique identifier for a certificate.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"certificate_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"Custom Certificate":{"$ref":"#/paths/~1v2~1certificates/post/responses/201/content/application~1json/examples/Custom%20Certificate"},"Let's Encrypt Certificate":{"value":{"certificate":{"created_at":"2025-08-15T13:52:28.122Z","dns_names":["www.example.com","example.com"],"id":"ba9b9c18-6c59-46c2-99df-70da170a42ba","name":"web-cert-02","not_after":"2025-08-15T13:52:28.122Z","sha1_fingerprint":"479c82b5c63cb6d3e6fac4624d58a33b267e166c","state":"verified","type":"lets_encrypt"}}}},"schema":{"properties":{"certificate":{"$ref":"#/paths/~1v2~1certificates/get/responses/200/content/application~1json/schema/allOf/0/properties/certificates/items"}},"type":"object"}}},"description":"The response will be a JSON object with a `certificate` key. This will be set to an object containing the standard certificate attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Certificate","tags":["Certificates"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/certificates/892071a0-bb95-49bc-8021-3afd67a210bf\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    cert, _, err := client.Certificates.Get(ctx, \"892071a0-bb95-49bc-8021-3afd67a210bf\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.certificates.find(id: '892071a0-bb95-49bc-8021-3afd67a210bf')"}]}},"/v2/customers/my/balance":{"get":{"description":"To retrieve the balances on a customer's account, send a GET request to `/v2/customers/my/balance`.","operationId":"balance_get","responses":{"200":{"content":{"application/json":{"example":{"account_balance":"12.23","generated_at":"2025-08-15T13:52:28.122Z","month_to_date_balance":"23.44","month_to_date_usage":"11.21"},"schema":{"properties":{"account_balance":{"description":"Current balance of the customer's most recent billing activity.  Does not reflect `month_to_date_usage`.","example":"12.23","type":"string"},"generated_at":{"description":"The time at which balances were most recently generated.","example":"2025-08-15T13:52:28.122Z","format":"date-time","type":"string"},"month_to_date_balance":{"description":"Balance as of the `generated_at` time.  This value includes the `account_balance` and `month_to_date_usage`.","example":"23.44","type":"string"},"month_to_date_usage":{"description":"Amount used in the current billing period as of the `generated_at` time.","example":"11.21","type":"string"}},"type":"object"}}},"description":"The response will be a JSON object that contains the following attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Customer Balance","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/balance\""}]}},"/v2/customers/my/billing_history":{"get":{"description":"To retrieve a list of all billing history entries, send a GET request to `/v2/customers/my/billing_history`.","operationId":"billingHistory_list","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"billing_history":{"items":{"properties":{"amount":{"description":"Amount of the billing history entry.","example":"12.34","type":"string"},"date":{"description":"Time the billing history entry occurred.","example":"2025-08-15T13:52:28.122Z","format":"date-time","type":"string"},"description":{"description":"Description of the billing history entry.","example":"Invoice for May 2018","type":"string"},"invoice_id":{"description":"ID of the invoice associated with the billing history entry, if  applicable.","example":"123","type":"string"},"invoice_uuid":{"description":"UUID of the invoice associated with the billing history entry, if  applicable.","example":"example-uuid","type":"string"},"type":{"description":"Type of billing history entry.","enum":["ACHFailure","Adjustment","AttemptFailed","Chargeback","Credit","CreditExpiration","Invoice","Payment","Refund","Reversal"],"example":"Invoice","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"properties":{"meta":{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2/properties/meta/allOf/0"}},"required":["meta"],"type":"object"}],"example":{"billing_history":[{"amount":"12.34","date":"2025-08-15T13:52:28.122Z","description":"Invoice for May 2018","invoice_id":"123","invoice_uuid":"example-uuid","type":"Invoice"},{"amount":"-12.34","date":"2025-08-15T13:52:28.122Z","description":"Payment (MC 2018)","type":"Payment"}],"links":{"pages":{"last":"https://api.digitalocean.com/v2/customers/my/billing_history?page=3&per_page=2","next":"https://api.digitalocean.com/v2/customers/my/billing_history?page=2&per_page=2"}},"meta":{"total":5}}}}},"description":"The response will be a JSON object that contains the following attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Billing History","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/billing_history\""}]}},"/v2/customers/my/invoices":{"get":{"description":"To retrieve a list of all invoices, send a GET request to `/v2/customers/my/invoices`.","operationId":"invoices_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"invoice_preview":{"$ref":"#/paths/~1v2~1customers~1my~1invoices/get/responses/200/content/application~1json/schema/allOf/0/properties/invoices/items"},"invoices":{"items":{"description":"The invoice preview.","properties":{"amount":{"description":"Total amount of the invoice, in USD.  This will reflect month-to-date usage in the invoice preview.","example":"23.45","type":"string"},"invoice_period":{"description":"Billing period of usage for which the invoice is issued, in `YYYY-MM`  format.","example":"2020-01","type":"string"},"invoice_uuid":{"description":"The UUID of the invoice. The canonical reference for the invoice.","example":"fdabb512-6faf-443c-ba2e-665452332a9e","type":"string"},"updated_at":{"description":"Time the invoice was last updated.  This is only included with the invoice preview.","example":"2025-08-15T13:52:28.122Z","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"invoice_preview":{"amount":"34.56","invoice_period":"2020-02","invoice_uuid":"1afe95e6-0958-4eb0-8d9a-9c5060d3ef03","updated_at":"2025-08-15T13:52:28.122Z"},"invoices":[{"amount":"12.34","invoice_period":"2019-12","invoice_uuid":"22737513-0ea7-4206-8ceb-98a575af7681"},{"amount":"23.45","invoice_period":"2019-11","invoice_uuid":"fdabb512-6faf-443c-ba2e-665452332a9e"}],"links":{"pages":{"last":"https://api.digitalocean.com/v2/customers/my/invoices?page=35&per_page=2","next":"https://api.digitalocean.com/v2/customers/my/invoices?page=2&per_page=2"}},"meta":{"total":70}}}}},"description":"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.\nEach element contains the invoice summary attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Invoices","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/invoices\""}]}},"/v2/customers/my/invoices/{invoice_uuid}":{"get":{"description":"To retrieve the invoice items for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID`.","operationId":"invoices_get_byUUID","parameters":[{"description":"UUID of the invoice","example":"22737513-0ea7-4206-8ceb-98a575af7681","in":"path","name":"invoice_uuid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"invoice_items":{"items":{"properties":{"amount":{"description":"Billed amount of this invoice item. Billed in USD.","example":"12.34","type":"string"},"description":{"description":"Description of the invoice item.","example":"a56e086a317d8410c8b4cfd1f4dc9f82","type":"string"},"duration":{"description":"Duration of time this invoice item was used and subsequently billed.","example":"744","type":"string"},"duration_unit":{"description":"Unit of time for duration.","example":"Hours","type":"string"},"end_time":{"description":"Time the invoice item stopped being billed for usage.","example":"2025-08-15T13:52:28.122Z","type":"string"},"group_description":{"description":"Description of the invoice item when it is a grouped set of usage, such  as DOKS or databases.","example":"my-doks-cluster","type":"string"},"product":{"description":"Name of the product being billed in the invoice item.","example":"Kubernetes Clusters","type":"string"},"project_name":{"description":"Name of the DigitalOcean Project this resource belongs to.","example":"web","type":"string"},"resource_id":{"description":"ID of the resource billing in the invoice item if available.","example":"2353624","type":"string"},"resource_uuid":{"description":"UUID of the resource billing in the invoice item if available.","example":"711157cb-37c8-4817-b371-44fa3504a39c","type":"string"},"start_time":{"description":"Time the invoice item began to be billed for usage.","example":"2025-08-15T13:52:28.122Z","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"invoice_items":[{"amount":"12.34","description":"a56e086a317d8410c8b4cfd1f4dc9f82","duration":"744","duration_unit":"Hours","end_time":"2025-08-15T13:52:28.122Z","group_description":"my-doks-cluster","product":"Kubernetes Clusters","resource_uuid":"711157cb-37c8-4817-b371-44fa3504a39c","start_time":"2025-08-15T13:52:28.122Z"},{"amount":"34.45","description":"Spaces ($5/mo 250GB storage & 1TB bandwidth)","duration":"744","duration_unit":"Hours","end_time":"2025-08-15T13:52:28.122Z","product":"Spaces Subscription","start_time":"2025-08-15T13:52:28.122Z"}],"links":{"pages":{"last":"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=3&per_page=2","next":"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=2&per_page=2"}},"meta":{"total":6}}}}},"description":"The response will be a JSON object with a key called `invoice_items`. This will be set to an array of invoice item objects.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Invoice by UUID","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681\""}]}},"/v2/customers/my/invoices/{invoice_uuid}/csv":{"get":{"description":"To retrieve a CSV for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/csv`.","operationId":"invoices_get_csvByUUID","parameters":[{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"text/csv":{"example":"product,group_description,description,hours,start,end,USD,project_name,category\nFloating 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\nTaxes,,STATE SALES TAX (6.25%),,2020-07-01 00:00:00 +0000,2020-07-31 23:59:59 +0000,$0.16,,iaas\n","schema":{"type":"string"}}},"description":"The response will be a CSV file.","headers":{"content-disposition":{"description":"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.","example":"attachment; filename=\"DigitalOcean Invoice 2020 Jul (6173678-418071234).csv\"","schema":{"type":"string"}},"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Invoice CSV by UUID","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: text/csv\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/csv\" --output invoice.csv"}]}},"/v2/customers/my/invoices/{invoice_uuid}/pdf":{"get":{"description":"To retrieve a PDF for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/pdf`.","operationId":"invoices_get_pdfByUUID","parameters":[{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"The response will be a PDF file.","headers":{"content-disposition":{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D~1csv/get/responses/200/headers/content-disposition"},"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Invoice PDF by UUID","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/pdf\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/pdf\" --output invoice.pdf"}]}},"/v2/customers/my/invoices/{invoice_uuid}/summary":{"get":{"description":"To retrieve a summary for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/summary`.","operationId":"invoices_get_summaryByUUID","parameters":[{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"amount":"27.13","billing_period":"2020-01","credits_and_adjustments":{"amount":"6.78","name":"Credits & adjustments"},"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":"2025-08-15T13:52:28.122Z","postal_code":"12345","region":"OC","updated_at":"2025-08-15T13:52:28.122Z"},"user_company":"DigitalOcean","user_email":"sammy@digitalocean.com","user_name":"Sammy Shark"},"schema":{"properties":{"amount":{"description":"Total amount of the invoice, in USD.  This will reflect month-to-date usage in the invoice preview.","example":"27.13","type":"string"},"billing_period":{"description":"Billing period of usage for which the invoice is issued, in `YYYY-MM`  format.","example":"2020-01","type":"string"},"credits_and_adjustments":{"allOf":[{"description":"A summary of the credits and adjustments contributing to the invoice."},{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D~1summary/get/responses/200/content/application~1json/schema/properties/overages/allOf/1"}]},"invoice_uuid":{"description":"UUID of the invoice","example":"22737513-0ea7-4206-8ceb-98a575af7681","type":"string"},"overages":{"allOf":[{"description":"A summary of the overages contributing to the invoice."},{"properties":{"amount":{"description":"Total amount charged in USD","example":"3.45","type":"string"},"name":{"description":"Name of the charge","example":"Overages","type":"string"}},"type":"object"}]},"product_charges":{"allOf":[{"description":"A summary of the product usage charges contributing to the invoice.  This will include an amount, and grouped aggregates by resource type  under the `items` key."},{"properties":{"amount":{"description":"Total amount charged","example":"12.34","type":"string"},"items":{"description":"List of amount, and grouped aggregates by resource type.","example":[{"amount":"10.00","count":"1","name":"Spaces Subscription"},{"amount":"2.34","count":"1","name":"Database Clusters"}],"items":{"properties":{"amount":{"description":"Amount of the charge","example":"10.00","type":"string"},"count":{"description":"Number of times the charge was applied","example":"1","type":"string"},"name":{"description":"Description of the charge","example":"Spaces Subscription","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"Description of usage charges","example":"Product usage charges","type":"string"}},"type":"object"}]},"taxes":{"allOf":[{"description":"A summary of the taxes contributing to the invoice."},{"$ref":"#/paths/~1v2~1customers~1my~1invoices~1%7Binvoice_uuid%7D~1summary/get/responses/200/content/application~1json/schema/properties/overages/allOf/1"}]},"user_billing_address":{"allOf":[{"description":"The billing address of the customer being invoiced."},{"properties":{"address_line1":{"description":"Street address line 1","example":"101 Shark Row","type":"string"},"address_line2":{"description":"Street address line 2","example":" ","type":"string"},"city":{"description":"City","example":"Atlantis","type":"string"},"country_iso2_code":{"description":"Country (ISO2) code","example":"US","type":"string"},"created_at":{"description":"Timestamp billing address was created","example":"2025-08-15T13:52:28.122Z","type":"string"},"postal_code":{"description":"Postal code","example":"12345","type":"string"},"region":{"description":"Region","example":"OC","type":"string"},"updated_at":{"description":"Timestamp billing address was updated","example":"2025-08-15T13:52:28.122Z","type":"string"}},"type":"object"}]},"user_company":{"description":"Company of the DigitalOcean customer being invoiced, if set.","example":"DigitalOcean","type":"string"},"user_email":{"description":"Email of the DigitalOcean customer being invoiced.","example":"sammy@digitalocean.com","type":"string"},"user_name":{"description":"Name of the DigitalOcean customer being invoiced.","example":"Sammy Shark","type":"string"}},"type":"object"}}},"description":"To retrieve a summary for an invoice, send a GET request to  `/v2/customers/my/invoices/$INVOICE_UUID/summary`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Invoice Summary by UUID","tags":["Billing"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/summary\""}]}},"/v2/databases":{"get":{"description":"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`.\nThe 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.\nThe embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster:\nThe embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster.","operationId":"databases_list_clusters","parameters":[{"description":"Limits the results to database clusters with a specific tag.","example":"production","in":"query","name":"tag_name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"databases":[{"connection":{"database":"","host":"backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","user":"doadmin"},"created_at":"2025-08-15T13:52:28.122Z","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-backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@private-backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","user":"doadmin"},"private_network_uuid":"d455e75d-4858-4eec-8c95-da2f0a5f93a7","region":"nyc3","size":"db-s-2vcpu-4gb","status":"online","tags":["production"],"users":[{"name":"doadmin","password":"wv78n3zpz42xezdk","role":"primary"}],"version":"10","version_end_of_availability":"2025-08-15T13:52:28.123Z","version_end_of_life":"2025-08-15T13:52:28.123Z"}]},"schema":{"properties":{"databases":{"items":{"properties":{"connection":{"allOf":[{"properties":{"database":{"description":"The name of the default database.","example":"defaultdb","readOnly":true,"type":"string"},"host":{"description":"The FQDN pointing to the database cluster's current primary node.","example":"backend-do-user-19081923-0.db.ondigitalocean.com","readOnly":true,"type":"string"},"password":{"description":"The randomly generated password for the default user.","example":"wv78n3zpz42xezdk","readOnly":true,"type":"string"},"port":{"description":"The port on which the database cluster is listening.","example":25060,"readOnly":true,"type":"integer"},"ssl":{"description":"A boolean value indicating if the connection should be made over SSL.","example":true,"readOnly":true,"type":"boolean"},"uri":{"description":"A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes.","example":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","readOnly":true,"type":"string"},"user":{"description":"The default user for the database.","example":"doadmin","readOnly":true,"type":"string"}},"type":"object"},{"readOnly":true}]},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the database cluster was created.","example":"2025-08-15T13:52:28.123Z","format":"date-time","readOnly":true,"type":"string"},"db_names":{"description":"An array of strings containing the names of databases created in the database cluster.","example":["doadmin"],"items":{"type":"string"},"nullable":true,"readOnly":true,"type":"array"},"engine":{"description":"A slug representing the database engine used for the cluster. The possible values are: \"pg\" for PostgreSQL, \"mysql\" for MySQL, \"redis\" for Redis, and \"mongodb\" for MongoDB.","enum":["pg","mysql","redis","mongodb"],"example":"mysql","type":"string"},"id":{"description":"A unique ID that can be used to identify and reference a database cluster.","example":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","format":"uuid","readOnly":true,"type":"string"},"maintenance_window":{"allOf":[{"nullable":true,"properties":{"day":{"description":"The day of the week on which to apply maintenance updates.","example":"tuesday","type":"string"},"description":{"description":"A list of strings, each containing information about a pending maintenance update.","example":["Update TimescaleDB to version 1.2.1","Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases"],"items":{"type":"string"},"readOnly":true,"type":"array"},"hour":{"description":"The hour in UTC at which maintenance updates will be applied in 24 hour format.","example":840,"type":"string"},"pending":{"description":"A boolean value indicating whether any maintenance is scheduled to be performed in the next window.","example":true,"readOnly":true,"type":"boolean"}},"required":["day","hour"],"type":"object"},{"readOnly":true}]},"name":{"description":"A unique, human-readable name referring to a database cluster.","example":"backend","type":"string"},"num_nodes":{"description":"The number of nodes in the database cluster.","example":2,"type":"integer"},"private_connection":{"allOf":[{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"},{"readOnly":true}]},"private_network_uuid":{"description":"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.","example":"d455e75d-4858-4eec-8c95-da2f0a5f93a7","pattern":"^$|[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}","type":"string"},"project_id":{"description":"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.","example":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","format":"uuid","type":"string"},"region":{"description":"The slug identifier for the region where the database cluster is located.","example":"nyc3","type":"string"},"rules":{"items":{"properties":{"cluster_uuid":{"description":"A unique ID for the database cluster to which the rule is applied.","example":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","pattern":"^$|[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}","type":"string"},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the firewall rule was created.","example":"2025-08-15T13:52:28.123Z","format":"date-time","readOnly":true,"type":"string"},"type":{"description":"The type of resource that the firewall rule allows to access the database cluster.","enum":["droplet","k8s","ip_addr","tag","app"],"example":"droplet","type":"string"},"uuid":{"description":"A unique ID for the firewall rule itself.","example":"79f26d28-ea8a-41f2-8ad8-8cfcdd020095","pattern":"^$|[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}","type":"string"},"value":{"description":"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.","example":"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61","type":"string"}},"required":["type","value"],"type":"object"},"type":"array"},"semantic_version":{"description":"A string representing the semantic version of the database engine in use for the cluster.","example":"8.0.28","readOnly":true,"type":"string"},"size":{"description":"The slug identifier representing the size of the nodes in the database cluster.","example":"db-s-2vcpu-4gb","type":"string"},"status":{"description":"A string representing the current status of the database cluster.","enum":["creating","online","resizing","migrating","forking"],"example":"creating","readOnly":true,"type":"string"},"tags":{"description":"An array of tags that have been applied to the database cluster.","example":["production"],"items":{"type":"string"},"nullable":true,"type":"array"},"users":{"items":{"properties":{"mysql_settings":{"properties":{"auth_plugin":{"description":"A string specifying the authentication method to be used for connections\nto the MySQL user account. The valid values are `mysql_native_password`\nor `caching_sha2_password`. If excluded when creating a new user, the\ndefault for the version of MySQL in use will be used. As of MySQL 8.0, the\ndefault is `caching_sha2_password`.\n","enum":["mysql_native_password","caching_sha2_password"],"example":"mysql_native_password","type":"string"}},"required":["auth_plugin"],"type":"object"},"name":{"description":"The name of a database user.","example":"app-01","type":"string"},"password":{"description":"A randomly generated password for the database user.","example":"jge5lfxtzhx42iff","readOnly":true,"type":"string"},"role":{"description":"A string representing the database user's role. The value will be either\n\"primary\" or \"normal\".\n","enum":["primary","normal"],"example":"normal","readOnly":true,"type":"string"}},"required":["name"],"type":"object"},"nullable":true,"readOnly":true,"type":"array"},"version":{"description":"A string representing the version of the database engine in use for the cluster.","example":"8","type":"string"},"version_end_of_availability":{"description":"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.","example":"2025-08-15T13:52:28.123Z","readOnly":true,"type":"string"},"version_end_of_life":{"description":"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.","example":"2025-08-15T13:52:28.123Z","readOnly":true,"type":"string"}},"required":["name","engine","num_nodes","size","region"],"type":"object"},"type":"array"}}}}},"description":"A JSON object with a key of `databases`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Database Clusters","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    clusters, _, err := client.Databases.List(ctx, opt)\n}"}]},"post":{"description":"To create a database cluster, send a POST request to `/v2/databases`.\nThe response will be a JSON object with a key called `database`. The value of this will be an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster's `status` attribute will be `creating`. When the cluster is ready to receive traffic, this will transition to `online`.\nThe embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster.\nDigitalOcean 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.\nNote: Backups are not supported for Redis clusters.","operationId":"databases_create_cluster","requestBody":{"content":{"application/json":{"examples":{"Create a New Database Cluster":{"value":{"engine":"pg","name":"backend","num_nodes":2,"region":"nyc3","size":"db-s-2vcpu-4gb","tags":["production"],"version":"14"}},"Create a New Database Cluster with trusted sources":{"value":{"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"},{"type":"tag","value":"test"}],"size":"db-s-2vcpu-4gb","tags":["production"],"version":"14"}},"Restore from a Database Cluster Backup":{"value":{"backup_restore":{"backup_created_at":"2025-08-15T13:52:28.123Z","database_name":"backend"},"engine":"pg","name":"backend-restored","num_nodes":2,"region":"nyc3","size":"db-s-2vcpu-4gb","version":"14"}}},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items"},{"properties":{"backup_restore":{"properties":{"backup_created_at":{"description":"The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.","example":"2025-08-15T13:52:28.123Z","format":"date-time","type":"string"},"database_name":{"description":"The name of an existing database cluster from which the backup will be restored.","example":"backend","type":"string"}},"required":["database_name"],"type":"object"}},"type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"database":{"connection":{"database":"","host":"backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","user":"doadmin"},"created_at":"2025-08-15T13:52:28.123Z","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":2,"private_connection":{"database":"","host":"private-backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@private-backend-do-user-19081923-0.db.ondigitalocean.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","status":"creating","tags":["production"],"users":[{"name":"doadmin","password":"wv78n3zpz42xezdk","role":"primary"}],"version":"14","version_end_of_availability":"2025-08-15T13:52:28.123Z","version_end_of_life":"2025-08-15T13:52:28.123Z"}},"schema":{"properties":{"database":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items"}},"required":["database"],"type":"object"}}},"description":"A JSON object with a key of `database`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"backend\", \"engine\": \"pg\", \"version\": \"14\", \"region\": \"nyc3\", \"size\": \"db-s-2vcpu-4gb\", \"num_nodes\": 2, \"tags\": [\"production\"]}' \\\n  \"https://api.digitalocean.com/v2/databases\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.DatabaseCreateRequest{\n        Name:       \"backend\",\n        EngineSlug: \"pg\",\n        Version:    \"14\",\n        Region:     \"nyc3\",\n        SizeSlug:   \"db-s-2vcpu-4gb\",\n        NumNodes:   2,\n    }\n\n    cluster, _, err := client.Databases.Create(ctx, createRequest)\n}"}]}},"/v2/databases/options":{"get":{"description":"To list all of the options available for the offered database engines, send a GET request to `/v2/databases/options`.\nThe result will be a JSON object with an `options` key.","operationId":"databases_list_options","responses":{"200":{"content":{"application/json":{"example":{"options":{"mongodb":{"layouts":[{"num_nodes":1,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb"]},{"num_nodes":3,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb","db-s-2vcpu-4gb","db-s-4vcpu-8gb"]}],"regions":["ams3","blr1"],"versions":["4.4","5.0"]},"mysql":{"layouts":[{"num_nodes":1,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb"]},{"num_nodes":2,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb","db-s-2vcpu-4gb","db-s-4vcpu-8gb"]},{"num_nodes":3,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb","db-s-2vcpu-4gb","db-s-4vcpu-8gb"]}],"regions":["ams3","blr1"],"versions":["8"]},"pg":{"layouts":[{"num_nodes":1,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb"]},{"num_nodes":2,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb","db-s-2vcpu-4gb","db-s-4vcpu-8gb"]}],"regions":["ams3","blr1"],"versions":["11","12","13","14"]},"redis":{"layouts":[{"num_nodes":1,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb"]},{"num_nodes":2,"sizes":["db-s-1vcpu-1gb","db-s-1vcpu-2gb","db-s-2vcpu-4gb","db-s-4vcpu-8gb"]}],"regions":["ams3","blr1"],"versions":["6"]}},"version_availability":{"mongodb":[{"end_of_availability":"null","end_of_life":"2025-08-15T13:52:28.123Z","version":"4.4"},{"end_of_availability":"null","end_of_life":"2025-08-15T13:52:28.123Z","version":"5.0"}],"mysql":[{"end_of_availability":"null","end_of_life":"null","version":"8"}],"pg":[{"end_of_availability":"2025-08-15T13:52:28.123Z","end_of_life":"2025-08-15T13:52:28.123Z","version":"11"},{"end_of_availability":"2025-08-15T13:52:28.123Z","end_of_life":"2025-08-15T13:52:28.123Z","version":"12"},{"end_of_availability":"2025-08-15T13:52:28.123Z","end_of_life":"2025-08-15T13:52:28.123Z","version":"13"},{"end_of_availability":"2025-08-15T13:52:28.123Z","end_of_life":"2025-08-15T13:52:28.123Z","version":"14"}],"redis":[{"end_of_availability":"null","end_of_life":"null","version":"7"}]}},"schema":{"properties":{"options":{"properties":{"mongodb":{"allOf":[{"properties":{"regions":{"description":"An array of strings containing the names of available regions","example":["ams3","blr1"],"items":{"type":"string"},"readOnly":true,"type":"array"}},"type":"object"},{"properties":{"versions":{"description":"An array of strings containing the names of available regions","example":["4.4","5.0"],"items":{"type":"string"},"readOnly":true,"type":"array"}},"type":"object"},{"properties":{"layouts":{"description":"An array of objects, each indicating the node sizes (otherwise referred to as slugs) that are available with various numbers of nodes in the database cluster. Each slugs denotes the node's identifier, CPU, and RAM (in that order).","items":{"properties":{"num_nodes":{"example":1,"type":"integer"},"sizes":{"description":"An array of objects containing the slugs available with various node counts","example":["db-s-1vcpu-1gb","db-s-1vcpu-2gb"],"items":{"type":"string"},"readOnly":true,"type":"array"}},"type":"object"},"readOnly":true,"type":"array"}},"type":"object"}]},"mysql":{"allOf":[{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/0"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/1"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/2"}]},"pg":{"allOf":[{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/0"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/1"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/2"}]},"redis":{"allOf":[{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/0"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/1"},{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/options/properties/mongodb/allOf/2"}]}},"type":"object"},"version_availability":{"properties":{"mongodb":{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/version_availability/properties/pg"},"mysql":{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/version_availability/properties/pg"},"pg":{"description":"An array of objects, each indicating the version end-of-life, end-of-availability for various database engines","items":{"properties":{"end_of_availability":{"description":"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.","example":"2025-08-15T13:52:28.123Z","type":"string"},"end_of_life":{"description":"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.","example":"2025-08-15T13:52:28.123Z","type":"string"},"version":{"description":"The engine version.","example":"8","type":"string"}},"type":"object"},"type":"array"},"redis":{"$ref":"#/paths/~1v2~1databases~1options/get/responses/200/content/application~1json/schema/properties/version_availability/properties/pg"}},"type":"object"}},"type":"object"}}},"description":"A JSON string with a key of `options`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Database Options","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/options\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    options, _, err := client.Databases.ListOptions(ctx)\n}"}]}},"/v2/databases/{database_cluster_uuid}":{"delete":{"description":"To destroy a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID`.\nA status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.","operationId":"databases_destroy_cluster","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Destroy a Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    _, err := client.Databases.Delete(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]},"get":{"description":"To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID`.\nThe response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes.\nThe embedded connection and private_connection objects will contain the information needed to access the database cluster.\nThe embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster.","operationId":"databases_get_cluster","parameters":[{"description":"A unique identifier for a database cluster.","example":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","in":"path","name":"database_cluster_uuid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1databases/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    cluster, _, err := client.Databases.Get(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/backups":{"get":{"description":"To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/backups`.\n**Note**: Backups are not supported for Redis clusters.\nThe 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.","operationId":"databases_list_backups","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"backups":[{"created_at":"2025-08-15T13:52:28.123Z","size_gigabytes":0.03357696},{"created_at":"2025-08-15T13:52:28.123Z","size_gigabytes":0.03364864}]},"schema":{"properties":{"backups":{"items":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format at which the backup was created.","example":"2025-08-15T13:52:28.123Z","format":"date-time","type":"string"},"size_gigabytes":{"description":"The size of the database backup in GBs.","example":0.03364864,"type":"number"}},"required":["created_at","size_gigabytes"],"type":"object"},"type":"array"}},"required":["backups"],"type":"object"}}},"description":"A JSON object with a key of `database_backups`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Backups for a Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    backups, _, err := client.Databases.ListBackups(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}"}]}},"/v2/databases/{database_cluster_uuid}/ca":{"get":{"description":"To retrieve the public certificate used to secure the connection to the database cluster send a GET request to\n`/v2/databases/$DATABASE_ID/ca`.\n\nThe response will be a JSON object with a `ca` key. This will be set to an object\ncontaining the base64 encoding of the public key certificate.\n","operationId":"databases_get_ca","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"ca":{"certificate":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="}},"schema":{"properties":{"ca":{"properties":{"certificate":{"description":"base64 encoding of the certificate used to secure database connections","example":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==","readOnly":true,"type":"string"}},"required":["certificate"],"type":"object"}},"required":["ca"],"type":"object"}}},"description":"A JSON object with a key of `ca`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the Public Certificate","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/ca\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    ca, _, err := client.Databases.GetCA(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/config":{"get":{"description":"Shows configuration parameters for an existing database cluster by sending a GET request to\n`/v2/databases/$DATABASE_ID/config`.\nThe response is a JSON object with a `config` key, which is set to an object\ncontaining any database configuration parameters.\n","operationId":"databases_get_config","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"properties":{"config":{"anyOf":[{"properties":{"backup_hour":{"description":"The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed.","example":3,"maximum":23,"minimum":0,"type":"integer"},"backup_minute":{"description":"The minute of the backup hour when backup for the service starts. New backup  only starts if previous backup has already completed.","example":30,"maximum":59,"minimum":0,"type":"integer"},"binlog_retention_period":{"description":"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.","example":600,"maximum":86400,"minimum":600,"type":"number"},"connect_timeout":{"description":"The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake.","example":10,"maximum":3600,"minimum":2,"type":"integer"},"default_time_zone":{"description":"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.","example":"+03:00","maxLength":100,"minLength":2,"type":"string"},"group_concat_max_len":{"description":"The maximum permitted result length, in bytes, for the GROUP_CONCAT() function.","example":1024,"maximum":18446744073709552000,"minimum":4,"type":"integer"},"information_schema_stats_expiry":{"description":"The time, in seconds, before cached statistics expire.","example":86400,"maximum":31536000,"minimum":900,"type":"integer"},"innodb_ft_min_token_size":{"description":"The minimum length of words that an InnoDB FULLTEXT index stores.","example":3,"maximum":16,"minimum":0,"type":"integer"},"innodb_ft_server_stopword_table":{"description":"The InnoDB FULLTEXT index stopword list for all InnoDB tables.","example":"db_name/table_name","maxLength":1024,"pattern":"^.+/.+$","type":"string"},"innodb_lock_wait_timeout":{"description":"The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up.","example":50,"maximum":3600,"minimum":1,"type":"integer"},"innodb_log_buffer_size":{"description":"The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk.","example":16777216,"maximum":4294967295,"minimum":1048576,"type":"integer"},"innodb_online_alter_log_max_size":{"description":"The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables.","example":134217728,"maximum":1099511627776,"minimum":65536,"type":"integer"},"innodb_print_all_deadlocks":{"description":"When enabled, records information about all deadlocks in InnoDB user transactions  in the error log. Disabled by default.","example":true,"type":"boolean"},"innodb_rollback_on_timeout":{"description":"When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction.","example":true,"type":"boolean"},"interactive_timeout":{"description":"The time, in seconds, the server waits for activity on an interactive. connection before closing it.","example":3600,"maximum":604800,"minimum":30,"type":"integer"},"internal_tmp_mem_storage_engine":{"description":"The storage engine for in-memory internal temporary tables.","enum":["TempTable","MEMORY"],"example":"TempTable","type":"string"},"long_query_time":{"description":"The time, in seconds, for a query to take to execute before  being captured by slow_query_logs. Default is 10 seconds.","example":10,"maximum":3600,"minimum":0,"type":"number"},"max_allowed_packet":{"description":"The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M).","example":67108864,"maximum":1073741824,"minimum":102400,"type":"integer"},"max_heap_table_size":{"description":"The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)","example":16777216,"maximum":1073741824,"minimum":1048576,"type":"integer"},"net_read_timeout":{"description":"The time, in seconds, to wait for more data from an existing connection. aborting the read.","example":30,"maximum":3600,"minimum":1,"type":"integer"},"net_write_timeout":{"description":"The number of seconds to wait for a block to be written to a connection before aborting the write.","example":30,"maximum":3600,"minimum":1,"type":"integer"},"slow_query_log":{"description":"When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false.","example":true,"type":"boolean"},"sort_buffer_size":{"description":"The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K).","example":262144,"maximum":1073741824,"minimum":32768,"type":"integer"},"sql_mode":{"description":"Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas.","example":"ANSI,TRADITIONAL","maxLength":1024,"pattern":"^[A-Z_]*(,[A-Z_]+)*$","type":"string"},"sql_require_primary_key":{"description":"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.","example":true,"type":"boolean"},"tmp_table_size":{"description":"The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M).","example":16777216,"maximum":1073741824,"minimum":1048576,"type":"integer"},"wait_timeout":{"description":"The number of seconds the server waits for activity on a noninteractive connection before closing it.","example":28800,"maximum":2147483,"minimum":1,"type":"integer"}},"type":"object"},{"properties":{"autovacuum_analyze_scale_factor":{"description":"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).","example":0.2,"maximum":1,"minimum":0,"type":"number"},"autovacuum_analyze_threshold":{"description":"Specifies the minimum number of inserted, updated, or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples.","example":50,"maximum":2147483647,"minimum":0,"type":"integer"},"autovacuum_freeze_max_age":{"description":"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.","example":200000000,"maximum":1500000000,"minimum":200000000,"type":"integer"},"autovacuum_max_workers":{"description":"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.","example":5,"maximum":20,"minimum":1,"type":"integer"},"autovacuum_naptime":{"description":"Specifies the minimum delay, in seconds, between autovacuum runs on any given database. The default is one minute.","example":43200,"maximum":86400,"minimum":0,"type":"integer"},"autovacuum_vacuum_cost_delay":{"description":"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.","example":20,"maximum":100,"minimum":-1,"type":"integer"},"autovacuum_vacuum_cost_limit":{"description":"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.","example":-1,"maximum":10000,"minimum":-1,"type":"integer"},"autovacuum_vacuum_scale_factor":{"description":"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).","example":0.2,"maximum":1,"minimum":0,"type":"number"},"autovacuum_vacuum_threshold":{"description":"Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples.","example":50,"maximum":2147483647,"minimum":0,"type":"integer"},"backup_hour":{"description":"The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed.","example":3,"maximum":23,"minimum":0,"type":"integer"},"backup_minute":{"description":"The minute of the backup hour when backup for the service starts. New backup is only started if previous backup has already completed.","example":30,"maximum":59,"minimum":0,"type":"integer"},"bgwriter_delay":{"description":"Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms.","example":200,"maximum":10000,"minimum":10,"type":"integer"},"bgwriter_flush_after":{"description":"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.","example":512,"maximum":2048,"minimum":0,"type":"integer"},"bgwriter_lru_maxpages":{"description":"The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100.","example":100,"maximum":1073741823,"minimum":0,"type":"integer"},"bgwriter_lru_multiplier":{"description":"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.","example":2,"maximum":10,"minimum":0,"type":"number"},"deadlock_timeout":{"description":"The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition.","example":1000,"maximum":1800000,"minimum":500,"type":"integer"},"default_toast_compression":{"description":"Specifies the default TOAST compression method for values of compressible columns (the default is lz4).","enum":["lz4","pglz"],"example":"lz4","type":"string"},"idle_in_transaction_session_timeout":{"description":"Time out sessions with open transactions after this number of milliseconds","example":10000,"maximum":604800000,"minimum":0,"type":"integer"},"jit":{"description":"Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT).","example":true,"type":"boolean"},"log_autovacuum_min_duration":{"description":"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.","example":-1,"maximum":2147483647,"minimum":-1,"type":"integer"},"log_error_verbosity":{"description":"Controls the amount of detail written in the server log for each message that is logged.","enum":["TERSE","DEFAULT","VERBOSE"],"example":"VERBOSE","type":"string"},"log_line_prefix":{"description":"Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc.","enum":["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"],"example":"pid=%p,user=%u,db=%d,app=%a,client=%h","type":"string"},"log_min_duration_statement":{"description":"Log statements that take more than this number of milliseconds to run. If -1, disables.","example":-1,"maximum":86400000,"minimum":-1,"type":"integer"},"max_files_per_process":{"description":"PostgreSQL maximum number of files that can be open per process.","example":2048,"maximum":4096,"minimum":1000,"type":"integer"},"max_locks_per_transaction":{"description":"PostgreSQL maximum locks per transaction. Once increased, this parameter cannot be lowered from its set value.","example":128,"maximum":6400,"minimum":64,"type":"integer"},"max_logical_replication_workers":{"description":"PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers).","example":16,"maximum":64,"minimum":4,"type":"integer"},"max_parallel_workers":{"description":"Sets the maximum number of workers that the system can support for parallel queries.","example":12,"maximum":96,"minimum":0,"type":"integer"},"max_parallel_workers_per_gather":{"description":"Sets the maximum number of workers that can be started by a single Gather or Gather Merge node.","example":16,"maximum":96,"minimum":0,"type":"integer"},"max_pred_locks_per_transaction":{"description":"PostgreSQL maximum predicate locks per transaction.","example":128,"maximum":640,"minimum":64,"type":"integer"},"max_prepared_transactions":{"description":"PostgreSQL maximum prepared transactions. Once increased, this parameter cannot be lowered from its set value.","example":20,"maximum":10000,"minimum":0,"type":"integer"},"max_replication_slots":{"description":"PostgreSQL maximum replication slots.","example":16,"maximum":64,"minimum":8,"type":"integer"},"max_stack_depth":{"description":"Maximum depth of the stack in bytes.","example":2097152,"maximum":6291456,"minimum":2097152,"type":"integer"},"max_standby_archive_delay":{"description":"Max standby archive delay in milliseconds.","example":43200,"maximum":43200000,"minimum":1,"type":"integer"},"max_standby_streaming_delay":{"description":"Max standby streaming delay in milliseconds.","example":43200,"maximum":43200000,"minimum":1,"type":"integer"},"max_wal_senders":{"description":"PostgreSQL maximum WAL senders. Once increased, this parameter cannot be lowered from its set value.","example":32,"maximum":64,"minimum":20,"type":"integer"},"max_worker_processes":{"description":"Sets the maximum number of background processes that the system can support. Once increased, this parameter cannot be lowered from its set value.","example":16,"maximum":96,"minimum":8,"type":"integer"},"pg_partman_bgw.interval":{"description":"Sets the time interval to run pg_partman's scheduled tasks.","example":3600,"maximum":604800,"minimum":3600,"type":"integer"},"pg_partman_bgw.role":{"description":"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.","example":"myrolename","maxLength":64,"pattern":"^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$","type":"string"},"pg_stat_statements.track":{"description":"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.","enum":["all","top","none"],"example":"all","type":"string"},"pgbouncer":{"description":"PGBouncer connection pooling settings","properties":{"autodb_idle_timeout":{"description":"If the automatically-created database pools have been unused this many seconds, they are freed. If 0, timeout is disabled.","example":3600,"maximum":86400,"minimum":0,"type":"integer"},"autodb_max_db_connections":{"description":"Only allows a maximum this many server connections per database (regardless of user). If 0, allows unlimited connections.","example":1,"maximum":2147483647,"minimum":0,"type":"integer"},"autodb_pool_mode":{"description":"PGBouncer pool mode","enum":["session","transaction","statement"],"example":"session","type":"string"},"autodb_pool_size":{"description":"If non-zero, automatically creates a pool of that size per user when a pool doesn't exist.","example":1,"maximum":10000,"minimum":0,"type":"integer"},"ignore_startup_parameters":{"description":"List of parameters to ignore when given in startup packet.","example":["extra_float_digits","search_path"],"items":{"description":"Enum of parameters to ignore when given in startup packet.","enum":["extra_float_digits","search_path"],"type":"string"},"maxItems":32,"type":"array"},"min_pool_size":{"description":"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.","example":1,"maximum":10000,"minimum":0,"type":"integer"},"server_idle_timeout":{"description":"Drops server connections if they have been idle more than this many seconds.  If 0, timeout is disabled. ","example":600,"maximum":86400,"minimum":0,"type":"integer"},"server_lifetime":{"description":"The pooler closes any unused server connection that has been connected longer than this amount of seconds.","example":3600,"maximum":86400,"minimum":60,"type":"integer"},"server_reset_query_always":{"description":"Run server_reset_query (DISCARD ALL) in all pooling modes.","example":false,"type":"boolean"}},"type":"object"},"shared_buffers_percentage":{"description":"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.","example":41.5,"maximum":60,"minimum":20,"type":"number"},"stat_monitor_enable":{"description":"Enable the pg_stat_monitor extension. <b>Enabling this extension will cause the cluster to be restarted.</b> When this extension is enabled, pg_stat_statements results for utility commands are unreliable.","example":false,"type":"boolean"},"synchronous_replication":{"description":"Synchronous replication type. Note that the service plan also needs to support synchronous replication.","enum":["off","quorum"],"example":"off","type":"string"},"temp_file_limit":{"description":"PostgreSQL temporary file limit in KiB. If -1, sets to unlimited.","example":5000000,"maximum":2147483647,"minimum":-1,"type":"integer"},"timescaledb":{"description":"TimescaleDB extension configuration values","properties":{"max_background_workers":{"description":"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.","example":8,"maximum":4096,"minimum":1,"type":"integer"}},"type":"object"},"timezone":{"description":"PostgreSQL service timezone","example":"Europe/Helsinki","maxLength":64,"type":"string"},"track_activity_query_size":{"description":"Specifies the number of bytes reserved to track the currently executing command for each active session.","example":1024,"maximum":10240,"minimum":1024,"type":"integer"},"track_commit_timestamp":{"description":"Record commit time of transactions.","enum":["off","on"],"example":"off","type":"string"},"track_functions":{"description":"Enables tracking of function call counts and time used.","enum":["all","pl","none"],"example":"all","type":"string"},"track_io_timing":{"description":"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.","enum":["off","on"],"example":"off","type":"string"},"wal_sender_timeout":{"description":"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.","example":60000,"maximum":10800000,"minimum":0,"type":"integer"},"wal_writer_delay":{"description":"WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance","example":50,"maximum":200,"minimum":10,"type":"integer"},"work_mem":{"description":"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).","example":4,"maximum":1024,"minimum":1,"type":"integer"}},"type":"object"},{"properties":{"redis_acl_channels_default":{"description":"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 Redis configuration acl-pubsub-default.","enum":["allchannels","resetchannels"],"example":"allchannels","type":"string"},"redis_io_threads":{"description":"Redis IO thread count","example":1,"maximum":32,"minimum":1,"type":"integer"},"redis_lfu_decay_time":{"default":1,"description":"LFU maxmemory-policy counter decay time in minutes","example":1,"maximum":120,"minimum":1,"type":"integer"},"redis_lfu_log_factor":{"default":10,"description":"Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies","example":10,"maximum":100,"minimum":0,"type":"integer"},"redis_maxmemory_policy":{"description":"A string specifying the desired eviction policy for the Redis cluster.\n\n- `noeviction`: Don't evict any data, returns error when memory limit is reached.\n- `allkeys_lru:` Evict any key, least recently used (LRU) first.\n- `allkeys_random`: Evict keys in a random order.\n- `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first.\n- `volatile_random`: Evict keys with expiration only in a random order.\n- `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first.","enum":["noeviction","allkeys_lru","allkeys_random","volatile_lru","volatile_random","volatile_ttl"],"example":"allkeys_lru","type":"string"},"redis_notify_keyspace_events":{"default":"","description":"Set notify-keyspace-events option","example":"K","maxLength":32,"pattern":"^[KEg\\$lshzxeA]*$","type":"string"},"redis_number_of_databases":{"description":"Set number of redis databases. Changing this will cause a restart of redis service.","example":16,"maximum":128,"minimum":1,"type":"integer"},"redis_persistence":{"description":"When persistence is 'rdb', Redis 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.","enum":["off","rdb"],"example":"rdb","type":"string"},"redis_pubsub_client_output_buffer_limit":{"description":"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.","example":64,"maximum":512,"minimum":32,"type":"integer"},"redis_ssl":{"default":true,"description":"Require SSL to access Redis","example":true,"type":"boolean"},"redis_timeout":{"default":300,"description":"Redis idle connection timeout in seconds","example":300,"maximum":31536000,"minimum":0,"type":"integer"}},"type":"object"}]}},"required":["config"],"type":"object"}}},"description":"A JSON object with a key of `config`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Database Cluster Configuration","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config\""}]},"patch":{"description":"To update the configuration for an existing database cluster, send a PATCH request to\n`/v2/databases/$DATABASE_ID/config`.\n","operationId":"databases_patch_config","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"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}},"schema":{"properties":{"config":{"anyOf":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1config/get/responses/200/content/application~1json/schema/properties/config/anyOf/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1config/get/responses/200/content/application~1json/schema/properties/config/anyOf/1"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1config/get/responses/200/content/application~1json/schema/properties/config/anyOf/2"}]}},"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update the Database Configuration for an Existing Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -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}}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config\""}]}},"/v2/databases/{database_cluster_uuid}/dbs":{"get":{"description":"To list all of the databases in a clusters, send a GET request to\n`/v2/databases/$DATABASE_ID/dbs`.\n\nThe result will be a JSON object with a `dbs` key. This will be set to an array\nof database objects, each of which will contain the standard database attributes.\n\nNote: Database management is not supported for Redis clusters.\n","operationId":"databases_list","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"dbs":[{"name":"alpha"},{"name":"defaultdb"}]},"schema":{"properties":{"dbs":{"items":{"properties":{"name":{"description":"The name of the database.","example":"alpha","type":"string"}},"required":["name"],"type":"object"},"type":"array"}}}}},"description":"A JSON object with a key of `databases`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Databases","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    dbs, _, err := client.Databases.ListDBs(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}"}]},"post":{"description":"To add a new database to an existing cluster, send a POST request to\n`/v2/databases/$DATABASE_ID/dbs`.\n\nNote: Database management is not supported for Redis clusters.\n\nThe response will be a JSON object with a key called `db`. The value of this will be\nan object that contains the standard attributes associated with a database.\n","operationId":"databases_add","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"name":"alpha"},"schema":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1dbs/get/responses/200/content/application~1json/schema/properties/dbs/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"db":{"name":"alpha"}},"schema":{"properties":{"db":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1dbs/get/responses/200/content/application~1json/schema/properties/dbs/items"}},"required":["db"],"type":"object"}}},"description":"A JSON object with a key of `db`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add a New Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"alpha\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createDBReq := &godo.DatabaseCreateDBRequest{\n        Name: \"alpha\",\n    }\n\n    db, _, err := client.Databases.CreateDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", createDBReq)\n}"}]}},"/v2/databases/{database_cluster_uuid}/dbs/{database_name}":{"delete":{"description":"To delete a specific database, send a DELETE request to\n`/v2/databases/$DATABASE_ID/dbs/$DB_NAME`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n\nNote: Database management is not supported for Redis clusters.\n","operationId":"databases_delete","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1dbs~1%7Bdatabase_name%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Databases.DeleteDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"alpha\")\n}"}]},"get":{"description":"To show information about an existing database cluster, send a GET request to\n`/v2/databases/$DATABASE_ID/dbs/$DB_NAME`.\n\nNote: Database management is not supported for Redis clusters.\n\nThe response will be a JSON object with a `db` key. This will be set to an object\ncontaining the standard database attributes.\n","operationId":"databases_get","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"description":"The name of the database.","example":"alpha","in":"path","name":"database_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1dbs/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    db, _, err := client.Databases.GetDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"alpha\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/eviction_policy":{"get":{"description":"To retrieve the configured eviction policy for an existing Redis cluster, send a GET request to `/v2/databases/$DATABASE_ID/eviction_policy`.\nThe response will be a JSON object with an `eviction_policy` key. This will be set to a string representing the eviction policy.","operationId":"databases_get_evictionPolicy","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"eviction_policy":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1config/get/responses/200/content/application~1json/schema/properties/config/anyOf/2/properties/redis_maxmemory_policy"}},"required":["eviction_policy"]}}},"description":"A JSON string with a key of `eviction_policy`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the Eviction Policy for a Redis Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    db, _, err := client.Databases.GetEvictionPolicy(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]},"put":{"description":"To configure an eviction policy for an existing Redis cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy.","operationId":"databases_update_evictionPolicy","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"eviction_policy":"allkeys_lru"},"schema":{"properties":{"eviction_policy":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1config/get/responses/200/content/application~1json/schema/properties/config/anyOf/2/properties/redis_maxmemory_policy"}},"required":["eviction_policy"],"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Configure the Eviction Policy for a Redis Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"eviction_policy\":\"allkeys_lru\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    db, _, err := client.Databases.SetEvictionPolicy(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"allkeys_lru\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/firewall":{"get":{"description":"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`.\nThe result will be a JSON object with a `rules` key.","operationId":"databases_list_firewall_rules","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"rules":[{"cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","created_at":"2025-08-15T13:52:28.124Z","type":"k8s","uuid":"79f26d28-ea8a-41f2-8ad8-8cfcdd020095","value":"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"},{"cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","created_at":"2025-08-15T13:52:28.124Z","type":"ip_addr","uuid":"adfe81a8-0fa1-4e2d-973f-06aa5af19b44","value":"192.168.1.1"},{"cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","created_at":"2025-08-15T13:52:28.124Z","type":"droplet","uuid":"b9b42276-8295-4313-b40f-74173a7f46e6","value":"163973392"},{"cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","created_at":"2025-08-15T13:52:28.124Z","type":"tag","uuid":"718d23e0-13d7-4129-8a00-47fb72ee0deb","value":"backend"}]},"schema":{"properties":{"rules":{"items":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/rules/items"},"type":"array"}}}}},"description":"A JSON object with a key of `rules`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Firewall Rules (Trusted Sources) for a Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    rules, _, err := client.Databases.GetFirewallRules(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]},"put":{"description":"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). When possible, we recommend [placing your databases into a VPC network](https://www.digitalocean.com/docs/networking/vpc/) to limit access to them instead of using a firewall.\nA successful","operationId":"databases_update_firewall_rules","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"rules":[{"type":"ip_addr","value":"192.168.1.1"},{"type":"k8s","value":"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"},{"type":"droplet","value":"163973392"},{"type":"tag","value":"backend"}]},"schema":{"properties":{"rules":{"items":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/rules/items"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update Firewall Rules (Trusted Sources) for a Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -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\"]}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    req := godo.DatabaseUpdateFirewallRulesRequest{\n      Rules: []*godo.DatabaseFirewallRule{\n        {\n         Type:  \"ip_addr\",\n         Value: \"192.168.1.1\",\n       },\n        {\n         Type:  \"droplet\",\n         Value: \"163973392\",\n       },\n        {\n         Type:  \"k8s\",\n         Value: \"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61\",\n        },\n      },\n    }\n    _, err := client.Databases.UpdateFirewallRules(ctx, dbID, &req)\n}"}]}},"/v2/databases/{database_cluster_uuid}/maintenance":{"put":{"description":"To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/maintenance`.\nA successful request will receive a 204 No Content status code with no body in response.","operationId":"databases_update_maintenanceWindow","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"day":"tuesday","hour":840},"schema":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/maintenance_window/allOf/0"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Configure a Database Cluster's Maintenance Window","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"day\": \"tuesday\", \"hour\": \"14:00\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/maintenance\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    maintenanceRequest := &godo.DatabaseUpdateMaintenanceRequest{\n        Day:  \"thursday\",\n        Hour: \"16:00\",\n    }\n\n    _, err := client.Databases.UpdateMaintenance(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", maintenanceRequest)\n}"}]}},"/v2/databases/{database_cluster_uuid}/migrate":{"put":{"description":"To migrate a database cluster to a new region, send a `PUT` request to\n`/v2/databases/$DATABASE_ID/migrate`. The body of the request must specify a\n`region` attribute.\n\nA successful request will receive a 202 Accepted status code with no body in\nresponse. Querying the database cluster will show that its `status` attribute\nwill now be set to `migrating`. This will transition back to `online` when the\nmigration has completed.\n","operationId":"databases_update_region","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"example":{"region":"lon1"},"properties":{"region":{"description":"A slug identifier for the region to which the database cluster will be migrated.","example":"lon1","type":"string"}},"required":["region"],"type":"object"}}},"required":true},"responses":{"202":{"description":"The does not indicate the success or failure of any operation, just that the request has been accepted for processing.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Migrate a Database Cluster to a New Region","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"region\":\"lon1\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/migrate\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    migrateRequest := &godo.DatabaseMigrateRequest{\n        Region: \"lon1\",\n    }\n\n    _, err := client.Databases.Migrate(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", migrateRequest)\n}"}]}},"/v2/databases/{database_cluster_uuid}/online-migration":{"get":{"description":"To retrieve the status of the most recent online migration, send a GET request to `/v2/databases/$DATABASE_ID/online-migration`. ","operationId":"databases_get_migrationStatus","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-08-15T13:52:28.124Z","id":"77b28fc8-19ff-11eb-8c9c-c68e24557488","status":"running"},"schema":{"properties":{"created_at":{"description":"The time the migration was initiated, in ISO 8601 format.","example":"2025-08-15T13:52:28.124Z","type":"string"},"id":{"description":"The ID of the most recent migration.","example":"77b28fc8-19ff-11eb-8c9c-c68e24557488","type":"string"},"status":{"description":"The current status of the migration.","enum":["running","canceled","error","done"],"example":"running","type":"string"}},"type":"object"}}},"description":"A JSON object.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the Status of an Online Migration","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"source\":{\"host\":\"source-do-user-6607903-0.b.db.ondigitalocean.com\",\"dbname\":\"defaultdb\",\"port\":25060,\"username\":\"doadmin\",\"password\":\"paakjnfe10rsrsmf\"},\"disable_ssl\":false}' \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration\""}]},"put":{"description":"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, and Redis clusters.","operationId":"databases_update_onlineMigration","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"disable_ssl":false,"source":{"dbname":"defaultdb","host":"source-do-user-6607903-0.b.db.ondigitalocean.com","password":"paakjnfe10rsrsmf","port":25060,"username":"doadmin"}},"schema":{"properties":{"disable_ssl":{"description":"Enables SSL encryption when connecting to the source database.","example":false,"type":"boolean"},"source":{"allOf":[{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"}]}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1online-migration/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Start an Online Migration","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"source\":{\"host\":\"source-do-user-6607903-0.b.db.ondigitalocean.com\",\"dbname\":\"defaultdb\",\"port\":25060,\"username\":\"doadmin\",\"password\":\"paakjnfe10rsrsmf\"},\"disable_ssl\":false}' \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration\" "}]}},"/v2/databases/{database_cluster_uuid}/online-migration/{migration_id}":{"delete":{"description":"To stop an online migration, send a DELETE request to `/v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID`.\n\nA status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.\n","operationId":"databases_delete_onlineMigration","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"description":"A unique identifier assigned to the online migration.","example":"77b28fc8-19ff-11eb-8c9c-c68e24557488","in":"path","name":"migration_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Stop an Online Migration","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration/77b28fc8-19ff-11eb-8c9c-c68e24557488\""}]}},"/v2/databases/{database_cluster_uuid}/pools":{"get":{"description":"To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools`.\nThe result will be a JSON object with a `pools` key. This will be set to an array of connection pool objects.","operationId":"databases_list_connectionPools","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"pools":[{"connection":{"database":"foo","host":"backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25061,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/foo?sslmode=require","user":"doadmin"},"db":"defaultdb","mode":"session","name":"reporting-pool","size":10,"user":"doadmin"},{"connection":{"database":"backend-pool","host":"backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25061,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/backend-pool?sslmode=require","user":"doadmin"},"db":"defaultdb","mode":"transaction","name":"backend-pool","size":10,"user":"doadmin"}]},"schema":{"properties":{"pools":{"description":"An array of connection pool objects.","items":{"properties":{"connection":{"allOf":[{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"},{"readOnly":true}]},"db":{"description":"The database for use with the connection pool.","example":"defaultdb","type":"string"},"mode":{"description":"The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.","example":"transaction","type":"string"},"name":{"description":"A unique name for the connection pool. Must be between 3 and 60 characters.","example":"backend-pool","type":"string"},"private_connection":{"allOf":[{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"},{"readOnly":true}]},"size":{"description":"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.","example":10,"format":"int32","type":"integer"},"user":{"description":"The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user.","example":"doadmin","type":"string"}},"required":["name","mode","size","db"],"type":"object"},"readOnly":true,"type":"array"}},"type":"object"}}},"description":"A JSON object with a key of `pools`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Connection Pools (PostgreSQL)","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET /\n-H \"Content-Type: application/json\" /\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" /\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    pools, _, err := client.Databases.ListPools(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}"}]},"post":{"description":"For PostgreSQL database clusters, connection pools can be used to allow a\ndatabase to share its idle connections. The popular PostgreSQL connection\npooling utility PgBouncer is used to provide this service. [See here for more information](https://www.digitalocean.com/docs/databases/postgresql/how-to/manage-connection-pools/)\nabout how and why to use PgBouncer connection pooling including\ndetails about the available transaction modes.\n\nTo add a new connection pool to a PostgreSQL database cluster, send a POST\nrequest to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool,\nthe user to connect with, the database to connect to, as well as its desired\nsize and transaction mode.\n","operationId":"databases_add_connectionPool","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"db":"defaultdb","mode":"transaction","name":"backend-pool","size":10,"user":"doadmin"},"schema":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1pools/get/responses/200/content/application~1json/schema/properties/pools/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"pool":{"connection":{"database":"backend-pool","host":"backend-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25061,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/backend-pool?sslmode=require","user":"doadmin"},"db":"defaultdb","mode":"transaction","name":"backend-pool","size":10,"user":"doadmin"}},"schema":{"properties":{"pool":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1pools/get/responses/200/content/application~1json/schema/properties/pools/items"}},"required":["pool"],"type":"object"}}},"description":"A JSON object with a key of `pool`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add a New Connection Pool (PostgreSQL)","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"name\": \"backend-pool\",\"mode\": \"transaction\",\"size\": 10,\"db\": \"defaultdb\",\"user\": \"doadmin\"}' \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    createPoolReq := &godo.DatabaseCreatePoolRequest{\n        Name:     \"backend-pool\",\n        Database: \"defaultdb\",\n        Size:     10,\n        User:     \"doadmin\",\n        Mode:     \"transaction\",\n    }\n\n    pool, _, err := client.Databases.CreatePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", createPoolReq)\n}"}]}},"/v2/databases/{database_cluster_uuid}/pools/{pool_name}":{"delete":{"description":"To delete a specific connection pool for a PostgreSQL database cluster, send\na DELETE request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n","operationId":"databases_delete_connectionPool","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1pools~1%7Bpool_name%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Connection Pool (PostgreSQL)","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    _, err := client.Databases.DeletePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\")\n}"}]},"get":{"description":"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`.\nThe response will be a JSON object with a `pool` key.","operationId":"databases_get_connectionPool","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"description":"The name used to identify the connection pool.","example":"backend-pool","in":"path","name":"pool_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1pools/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Existing Connection Pool (PostgreSQL)","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET /\n-H \"Content-Type: application/json\" /\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" /\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    pool, _, err := client.Databases.GetPool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\")\n}"}]},"put":{"description":"To update a connection pool for a PostgreSQL database cluster, send a PUT request to  `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`.","operationId":"databases_update_connectionPool","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1pools~1%7Bpool_name%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"example":{"db":"defaultdb","mode":"transaction","size":10,"user":"doadmin"},"schema":{"properties":{"db":{"description":"The database for use with the connection pool.","example":"defaultdb","type":"string"},"mode":{"description":"The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.","example":"transaction","type":"string"},"size":{"description":"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.","example":10,"format":"int32","type":"integer"},"user":{"description":"The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user.","example":"doadmin","type":"string"}},"required":["mode","size","db"],"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update Connection Pools (PostgreSQL)","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"mode\": \"transaction\", \"size\": 15, \"db\": \"defaultdb\", \"user\": \"doadmin\"}' \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    updateReq := &godo.DatabaseUpdatePoolRequest{\n        User:     \"doadmin\",\n        Size:     15,\n        Database: \"defaultdb\",\n        Mode:     \"transaction\",\n    }\n\n    _, err := client.Databases.UpdatePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\", updateReq)\n\n}"}]}},"/v2/databases/{database_cluster_uuid}/replicas":{"get":{"description":"To list all of the read-only replicas associated with a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/replicas`.\n\n**Note**: Read-only replicas are not supported for Redis clusters.\n\nThe 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.","operationId":"databases_list_replicas","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"replicas":[{"connection":{"database":"defaultdb","host":"read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"","user":"doadmin"},"created_at":"2025-08-15T13:52:28.125Z","name":"read-nyc3-01","private_connection":{"database":"","host":"private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","user":"doadmin"},"region":"nyc3","status":"online"}]},"schema":{"properties":{"replicas":{"items":{"properties":{"connection":{"allOf":[{"readOnly":true},{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"}]},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the database cluster was created.","example":"2025-08-15T13:52:28.125Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"A unique ID that can be used to identify and reference a database replica.","example":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","format":"uuid","readOnly":true,"type":"string"},"name":{"description":"The name to give the read-only replicating","example":"read-nyc3-01","type":"string"},"private_connection":{"allOf":[{"readOnly":true},{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/connection/allOf/0"}]},"private_network_uuid":{"description":"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.","example":"9423cbad-9211-442f-820b-ef6915e99b5f","type":"string"},"region":{"description":"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.","example":"nyc3","type":"string"},"size":{"description":"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.","example":"db-s-2vcpu-4gb","type":"string","writeOnly":true},"status":{"description":"A string representing the current status of the database cluster.","enum":["creating","online","resizing","migrating","forking"],"example":"creating","readOnly":true,"type":"string"},"tags":{"description":"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.","example":["production"],"items":{"type":"string"},"type":"array"}},"required":["name"],"type":"object"},"type":"array"}}}}},"description":"A JSON object with a key of `replicas`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Read-only Replicas","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    replicas, _, err := client.Databases.ListReplicas(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}"}]},"post":{"description":"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.\n\n**Note**: Read-only replicas are not supported for Redis clusters.\n\nThe 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`.","operationId":"databases_create_replica","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"name":"read-nyc3-01","region":"nyc3","size":"db-s-2vcpu-4gb"},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1replicas/get/responses/200/content/application~1json/schema/properties/replicas/items"}],"required":["name","size"]}}}},"responses":{"201":{"content":{"application/json":{"example":{"replica":{"connection":{"database":"defaultdb","host":"read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"","user":"doadmin"},"created_at":"2025-08-15T13:52:28.125Z","name":"read-nyc3-01","private_connection":{"database":"","host":"private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com","password":"wv78n3zpz42xezdk","port":25060,"ssl":true,"uri":"postgres://doadmin:wv78n3zpz42xezdk@private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require","user":"doadmin"},"region":"nyc3","status":"online"}},"schema":{"properties":{"replica":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1replicas/get/responses/200/content/application~1json/schema/properties/replicas/items"}},"type":"object"}}},"description":"A JSON object with a key of `replica`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a Read-only Replica","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"read-nyc3-01\", \"region\":\"nyc3\", \"size\": \"db-s-2vcpu-4gb\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    replicaRequest := &godo.DatabaseCreateReplicaRequest{\n\n        Name:   \"read-nyc3-01\",\n        Region: \"nyc3\",\n        Size:   \"db-s-2vcpu-4gb\",\n    }\n\n    replica, _, err := client.Databases.CreateReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", replicaRequest)\n}"}]}},"/v2/databases/{database_cluster_uuid}/replicas/{replica_name}":{"delete":{"description":"To destroy a specific read-only replica, send a DELETE request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`.\n\n**Note**: Read-only replicas are not supported for Redis clusters.\n\nA status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.","operationId":"databases_destroy_replica","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1replicas~1%7Breplica_name%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Destroy a Read-only Replica","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Databases.DeleteReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}"}]},"get":{"description":"To show information about an existing database replica, send a GET request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`.\n\n**Note**: Read-only replicas are not supported for Redis clusters.\n\nThe response will be a JSON object with a `replica key`. This will be set to an object containing the standard database replica attributes.","operationId":"databases_get_replica","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"description":"The name of the database replica.","example":"read-nyc3-01","in":"path","name":"replica_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1replicas/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Read-only Replica","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    replica, _, err := client.Databases.GetReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote":{"put":{"description":"To promote a specific read-only replica, send a PUT request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME/promote`.\n\n**Note**: Read-only replicas are not supported for Redis clusters.\n\nA status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.","operationId":"databases_promote_replica","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1replicas~1%7Breplica_name%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Promote a Read-only Replica to become a Primary Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01/promote\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Databases.PromoteReplicaToPrimary(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/resize":{"put":{"description":"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.\nA 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.","operationId":"databases_update_clusterSize","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"num_nodes":3,"size":"db-s-4vcpu-8gb"},"schema":{"properties":{"num_nodes":{"description":"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.","example":3,"format":"int32","type":"integer"},"size":{"description":"A slug identifier representing desired the size of the nodes in the database cluster.","example":"db-s-4vcpu-8gb","type":"string"}},"required":["size","num_nodes"],"type":"object"}}},"required":true},"responses":{"202":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Resize a Database Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n-d '{\"size\":\"db-s-4vcpu-8gb\", \"num_nodes\":3}' \\\n\"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/resize\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    pat := \"mytoken\"\n\n    client := godo.NewFromToken(pat)\n    ctx := context.TODO()\n\n    resizeRequest := &godo.DatabaseResizeRequest{\n        SizeSlug: \"db-s-4vcpu-8gb\",\n        NumNodes: 3,\n    }\n}"}]}},"/v2/databases/{database_cluster_uuid}/sql_mode":{"get":{"description":"To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to `/v2/databases/$DATABASE_ID/sql_mode`.\nThe response will be a JSON object with a `sql_mode` key. This will be set to a string representing the configured SQL modes.","operationId":"databases_get_sql_mode","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"sql_mode":"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES"},"schema":{"properties":{"sql_mode":{"description":"A string specifying the configured SQL modes for the MySQL cluster.","example":"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES","type":"string"}},"required":["sql_mode"],"type":"object"}}},"description":"A JSON string with a key of `sql_mode`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the SQL Modes for a MySQL Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    sqlMode, _, err := client.Databases.GetSQLMode(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}"}]},"put":{"description":"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).\nA successful request will receive a 204 No Content status code with no body in response.","operationId":"databases_update_sql_mode","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"sql_mode":"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE"},"schema":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1sql_mode/get/responses/200/content/application~1json/schema"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update SQL Mode for a Cluster","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"sql_mode\":\"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    sqlMode := \"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE\"\n    _, err := client.Databases.SetSQLMode(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", sqlMode)\n}"}]}},"/v2/databases/{database_cluster_uuid}/upgrade":{"put":{"description":"To upgrade the major version of a database, send a PUT request to `/v2/databases/$DATABASE_ID/upgrade`, specifying the target version.\nA successful request will receive a 204 No Content status code with no body in response.","operationId":"databases_update_major_version","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"version":"14"},"schema":{"properties":{"version":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/version"}},"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Upgrade Major Version for a Database","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"version\":\"14\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/upgrade\""}]}},"/v2/databases/{database_cluster_uuid}/users":{"get":{"description":"To list all of the users for your database cluster, send a GET request to\n`/v2/databases/$DATABASE_ID/users`.\n\nNote: User management is not supported for Redis clusters.\n\nThe result will be a JSON object with a `users` key. This will be set to an array\nof database user objects, each of which will contain the standard database user attributes.\n\nFor MySQL clusters, additional options will be contained in the mysql_settings object.\n","operationId":"databases_list_users","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"users":[{"name":"app-01","password":"jge5lfxtzhx42iff","role":"normal"},{"name":"doadmin","password":"wv78n3zpz42xezd","role":"primary"}]},"schema":{"properties":{"users":{"items":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/users/items"},"type":"array"}}}}},"description":"A JSON object with a key of `users`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List all Database Users","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    users, _, err := client.Databases.ListUsers(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", nil)\n}"}]},"post":{"description":"To add a new database user, send a POST request to `/v2/databases/$DATABASE_ID/users`\nwith the desired username.\n\nNote: User management is not supported for Redis clusters.\n\nWhen adding a user to a MySQL cluster, additional options can be configured in the\n`mysql_settings` object.\n\nThe response will be a JSON object with a key called `user`. The value of this will be an\nobject that contains the standard attributes associated with a database user including\nits randomly generated password.\n","operationId":"databases_add_user","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"examples":{"Add New User":{"value":{"name":"app-01"}},"Add New User with MySQL Auth Plugin":{"value":{"mysql_settings":{"auth_plugin":"mysql_native_password"},"name":"app-02"}}},"schema":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/users/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"New User":{"value":{"user":{"name":"app-01","password":"jge5lfxtzhx42iff","role":"normal"}}},"New User with MySQL Auth Plugin":{"value":{"user":{"mysql_settings":{"auth_plugin":"mysql_native_password"},"name":"app-02","password":"wv78n3zpz42xezdk","role":"normal"}}}},"schema":{"properties":{"user":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/users/items"}},"required":["user"],"type":"object"}}},"description":"A JSON object with a key of `user`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add a Database User","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"app-01\"}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    addUserRequest := &godo.DatabaseCreateUserRequest{\n        Name: \"app-01\",\n    }\n\n    user, _, err := client.Databases.CreateUser(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", addUserRequest)\n\n}"}]}},"/v2/databases/{database_cluster_uuid}/users/{username}":{"delete":{"description":"To remove a specific database user, send a DELETE request to\n`/v2/databases/$DATABASE_ID/users/$USERNAME`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n\nNote: User management is not supported for Redis clusters.\n","operationId":"databases_delete_user","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1users~1%7Busername%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove a Database User","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Databases.DeleteUser(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"app-01\")\n}"}]},"get":{"description":"To show information about an existing database user, send a GET request to\n`/v2/databases/$DATABASE_ID/users/$USERNAME`.\n\nNote: User management is not supported for Redis clusters.\n\nThe response will be a JSON object with a `user` key. This will be set to an object\ncontaining the standard database user attributes.\n\nFor MySQL clusters, additional options will be contained in the mysql_settings\nobject.\n","operationId":"databases_get_user","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"description":"The name of the database user.","example":"app-01","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1users/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Database User","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    user, _, err := client.Databases.GetUser(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"app-01\")\n}"}]}},"/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth":{"post":{"description":"To reset the password for a database user, send a POST request to\n`/v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth`.\n\nFor `mysql` databases, the authentication method can be specifying by\nincluding a key in the JSON body called `mysql_settings` with the `auth_plugin`\nvalue specified.\n\nThe response will be a JSON object with a `user` key. This will be set to an\nobject containing the standard database user attributes.\n","operationId":"databases_reset_auth","parameters":[{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1users~1%7Busername%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"example":{"mysql_settings":{"auth_plugin":"caching_sha2_password"}},"schema":{"properties":{"mysql_settings":{"$ref":"#/paths/~1v2~1databases/get/responses/200/content/application~1json/schema/properties/databases/items/properties/users/items/properties/mysql_settings"}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1users/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Reset a Database User's Password or Authentication Method","tags":["Databases"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"mysql_settings\":{\"auth_plugin\": \"caching_sha2_password\"}}' \\\n  \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01/reset_auth\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    resetUserAuthRequest := &godo.DatabaseResetUserAuthRequest{\n        MySQLSettings: &DatabaseMySQLUserSettings{\n            AuthPlugin: \"caching_sha2_password\",\n         },\n    }\n    user, _, err := client.Databases.ResetUserAuth(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", \"app-01\", resetuserAuthRequest)\n}"}]}},"/v2/domains":{"get":{"description":"To retrieve a list of all of the domains in your account, send a GET request to `/v2/domains`.","operationId":"domains_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"domains":{"description":"Array of volumes.","items":{"properties":{"ip_address":{"description":"This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain.","example":"192.0.2.1","type":"string","writeOnly":true},"name":{"description":"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.","example":"example.com","type":"string"},"ttl":{"description":"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.","example":1800,"nullable":true,"readOnly":true,"type":"integer"},"zone_file":{"description":"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.","example":"$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","nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"type":"array"}},"required":["domains"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"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}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Domains","tags":["Domains"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n      Page:    1,\n      PerPage: 200,\n    }\n\ndomains, _, err := client.Domains.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ndomains = client.domains.all\ndomains.each"}]},"post":{"description":"To create a new domain, send a POST request to `/v2/domains`. Set the \"name\"\nattribute to the domain name you are adding. Optionally, you may set the\n\"ip_address\" attribute, and an A record will be automatically created pointing\nto the apex domain.\n","operationId":"domains_create","requestBody":{"content":{"application/json":{"example":{"name":"example.com"},"schema":{"$ref":"#/paths/~1v2~1domains/get/responses/200/content/application~1json/schema/allOf/0/properties/domains/items"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"domain":{"name":"example.com","ttl":1800,"zone_file":null}},"properties":{"domain":{"$ref":"#/paths/~1v2~1domains/get/responses/200/content/application~1json/schema/allOf/0/properties/domains/items"}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Domain","tags":["Domains"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"example.com\",\"ip_address\":\"1.2.3.4\"}' \\\n  \"https://api.digitalocean.com/v2/domains\""},{"lang":"Go","source":"import (\n  \"context\"\n  \"os\"\n\n  \"github.com/digitalocean/godo\"\n  )\n\nfunc main() {\n  token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n  client := godo.NewFromToken(token)\n  ctx := context.TODO()\n\n  createRequest := &godo.DomainCreateRequest{\n    Name:      \"example.com\",\n    IPAddress: \"1.2.3.4\",\n  }\n\n  domain, _, err := client.Domains.Create(ctx, createRequest)\n\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ndomain = DropletKit::Domain.new(\n  name: 'example.com',\n  ip_address: '1.2.3.4'\n)\nclient.domains.create(domain)"}]}},"/v2/domains/{domain_name}":{"delete":{"description":"To delete a domain, send a DELETE request to `/v2/domains/$DOMAIN_NAME`.\n","operationId":"domains_delete","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Domain","tags":["Domains"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains/example.com\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Domains.Delete(ctx, \"example.com\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.domains.delete(name: 'example.com')"}]},"get":{"description":"To get details about a specific domain, send a GET request to `/v2/domains/$DOMAIN_NAME`.","operationId":"domains_get","parameters":[{"description":"The name of the domain itself.","example":"example.com","in":"path","name":"domain_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"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"}},"properties":{"domain":{"$ref":"#/paths/~1v2~1domains/get/responses/200/content/application~1json/schema/allOf/0/properties/domains/items"}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Domain","tags":["Domains"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains/example.com\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    domain, _, err := client.Domains.Get(ctx, \"example.com\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.domains.find(name: 'example.com')"}]}},"/v2/domains/{domain_name}/records":{"get":{"description":"To get a listing of all records configured for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records`.\nThe 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.\n\n","operationId":"domains_list_records","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"},{"description":"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`.","example":"sub.example.com","in":"query","name":"name","schema":{"type":"string"}},{"description":"The type of the DNS record. For example: A, CNAME, TXT, ...","example":"A","in":"query","name":"type","schema":{"enum":["A","AAAA","CAA","CNAME","MX","NS","SOA","SRV","TXT"],"type":"string"}},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"All Domain Records":{"value":{"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}}}},"schema":{"allOf":[{"properties":{"domain_records":{"items":{"properties":{"data":{"description":"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.","example":"ns1.digitalocean.com","type":"string"},"flags":{"description":"An unsigned integer between 0-255 used for CAA records.","example":null,"nullable":true,"type":"integer"},"id":{"description":"A unique identifier for each domain record.","example":28448429,"readOnly":true,"type":"integer"},"name":{"description":"The host name, alias, or service being defined by the record.","example":"@","type":"string"},"port":{"description":"The port for SRV records.","example":null,"nullable":true,"type":"integer"},"priority":{"description":"The priority for SRV and MX records.","example":null,"nullable":true,"type":"integer"},"tag":{"description":"The parameter tag for CAA records. Valid values are \"issue\", \"issuewild\", or \"iodef\"","example":null,"nullable":true,"type":"string"},"ttl":{"description":"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.","example":1800,"type":"integer"},"type":{"description":"The type of the DNS record. For example: A, CNAME, TXT, ...","example":"NS","type":"string"},"weight":{"description":"The weight for SRV records.","example":null,"nullable":true,"type":"integer"}},"required":["type"],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Domain Records","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n      Page:    1,\n      PerPage: 200,\n    }\n\ndomains, _, err := client.Domains.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nrecords = client.domain_records.all(for_domain: 'example.com')\nrecords.each"}]},"post":{"description":"To create a new record to a domain, send a POST request to\n`/v2/domains/$DOMAIN_NAME/records`.\n\nThe request must include all of the required fields for the domain record type\nbeing added.\n\nSee the [attribute table](#tag/Domain-Records) for details regarding record\ntypes and their respective required attributes.\n","operationId":"domains_create_record","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"data":"162.10.66.0","flags":null,"name":"www","port":null,"priority":null,"tag":null,"ttl":1800,"type":"A","weight":null},"schema":{"anyOf":[{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data","flags","tag"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","data","priority"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data","flags","tag"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","ttl"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data","priority","port","flags","tag"]}]},{"allOf":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"},{"required":["type","name","data","flags","tag"]}]}],"discriminator":{"mapping":{"A":"models/domain_record_types.yml#/domain_record_a","AAAA":"models/domain_record_types.yml#/domain_record_aaaa","CAA":"models/domain_record_types.yml#/domain_record_caa","CNAME":"models/domain_record_types.yml#/domain_record_cname","MX":"models/domain_record_types.yml#/domain_record_mx","NS":"models/domain_record_types.yml#/domain_record_ns","SOA":"models/domain_record_types.yml#/domain_record_soa","SRV":"models/domain_record_types.yml#/domain_record_srv","TXT":"models/domain_record_types.yml#/domain_record_txt"},"propertyName":"type"}}}}},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"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}},"properties":{"domain_record":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Domain Record","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"A\",\"name\":\"www\",\"data\":\"162.10.66.0\",\"priority\":null,\"port\":null,\"ttl\":1800,\"weight\":null,\"flags\":null,\"tag\":null}' \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.DomainRecordEditRequest{\n      Type: \"A\",\n      Name: \"www\",\n      Data: \"1.2.3.4\",\n    }\n\n    domainRecord, _, err := client.Domains.CreateRecord(ctx, \"example.com\", createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nrecord = DropletKit::DomainRecord.new(\n  type: 'A',\n  name: 'www',\n  data: '162.10.66.0'\n)\nclient.domain_records.create(record, for_domain: 'example.com')"}]}},"/v2/domains/{domain_name}/records/{domain_record_id}":{"delete":{"description":"To delete a record for a domain, send a DELETE request to\n`/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`.\n\nThe record will be deleted and the response status will be a 204. This\nindicates a successful request with no body returned.\n","operationId":"domains_delete_record","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records~1%7Bdomain_record_id%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Domain Record","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records/3352896\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Domains.DeleteRecord(ctx, \"example.com\", 3352896)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.domain_records.delete(for_domain: 'example.com', id: 3352896)"}]},"get":{"description":"To retrieve a specific domain record, send a GET request to `/v2/domains/$DOMAIN_NAME/records/$RECORD_ID`.","operationId":"domains_get_record","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"},{"description":"The unique identifier of the domain record.","example":3352896,"in":"path","name":"domain_record_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"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}},"properties":{"domain_record":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Domain Record","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records/3352896\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    record, _, err := client.Domains.Record(ctx, \"example.com\", 3352896)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.domain_records.find(for_domain: 'example.com', id: 3352896)"}]},"patch":{"description":"To update an existing record, send a PATCH request to\n`/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for\nthe record type can be set to a new value for the record.\n\nSee the [attribute table](#tag/Domain-Records) for details regarding record\ntypes and their respective attributes.\n","operationId":"domains_patch_record","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records~1%7Bdomain_record_id%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"example":{"name":"blog","type":"A"},"schema":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"}}}},"responses":{"200":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records~1%7Bdomain_record_id%7D/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Domain Record","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"blog\",\"type\":\"A\"}' \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records/3352896\""}]},"put":{"description":"To update an existing record, send a PUT request to\n`/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for\nthe record type can be set to a new value for the record.\n\nSee the [attribute table](#tag/Domain-Records) for details regarding record\ntypes and their respective attributes.\n","operationId":"domains_update_record","parameters":[{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records~1%7Bdomain_record_id%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"example":{"name":"blog","type":"CNAME"},"schema":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/domain_records/items"}}}},"responses":{"200":{"$ref":"#/paths/~1v2~1domains~1%7Bdomain_name%7D~1records~1%7Bdomain_record_id%7D/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Domain Record","tags":["Domain Records"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"blog\"}' \\\n  \"https://api.digitalocean.com/v2/domains/example.com/records/3352896\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    editRequest := &godo.DomainRecordEditRequest{\n      Type: \"A\",\n      Name: \"blog\",\n    }\n\n    domainRecord, _, err := client.Domains.EditRecord(ctx, \"example.com\", 3352896, editRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nrecord = DropletKit::DomainRecord.new(name: 'blog')\nclient.domain_records.update(record, for_domain: 'example.com', id: 3352896)"}]}},"/v2/droplets":{"delete":{"description":"To delete **all** Droplets assigned to a specific tag, include the `tag_name`\nquery parameter set to the name of the tag in your DELETE request. For\nexample,  `/v2/droplets?tag_name=$TAG_NAME`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"droplets_destroy_byTag","parameters":[{"description":"Specifies Droplets to be deleted by tag.","example":"env:test","in":"query","name":"tag_name","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The action was successful and the response body is empty. This response has content-type set.","headers":{"content-type":{"description":"The type of data that is returned from a request. ","example":"application/json; charset=utf-8","schema":{"type":"string"}},"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Deleting Droplets by Tag","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets?tag_name=awesome\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    client.Droplets.DeleteByTag(ctx, \"awesome\") \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.droplets.delete_for_tag(tag_name: awesome)"}]},"get":{"description":"To list all Droplets in your account, send a GET request to `/v2/droplets`.\n\nThe response body will be a JSON object with a key of `droplets`. This will be\nset to an array containing objects each representing a Droplet. These will\ncontain the standard Droplet attributes.\n\n### Filtering Results by Tag\n\nIt's possible to request filtered results by including certain query parameters.\nTo only list Droplets assigned to a specific tag, include the `tag_name` query\nparameter set to the name of the tag in your GET request. For example,\n`/v2/droplets?tag_name=$TAG_NAME`.\n","operationId":"droplets_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"description":"Used to filter Droplets by a specific tag. Can not be combined with `name`.","example":"env:prod","in":"query","name":"tag_name","required":false,"schema":{"type":"string"}},{"description":"Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with `tag_name`.","example":"web-01","in":"query","name":"name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"All Droplets":{"value":{"droplets":[{"backup_ids":[53893572],"created_at":"2025-08-15T13:52:28.126Z","disk":25,"features":["backups","private_networking","ipv6"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.126Z","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":"2025-08-15T13:52:28.126Z","start":"2025-08-15T13:52:28.126Z"},"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","tags":["web","env:prod"],"vcpus":1,"volume_ids":[],"vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"},{"backup_ids":[],"created_at":"2025-08-15T13:52:28.126Z","disk":25,"features":["private_networking"],"id":3164459,"image":{"created_at":"2025-08-15T13:52:28.126Z","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":"2025-08-15T13:52:28.126Z","start":"2025-08-15T13:52:28.126Z"},"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","tags":["storage","env:prod"],"vcpus":1,"volume_ids":["506f78a4-e098-11e5-ad9f-000f53306ae1"],"vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"},{"backup_ids":[],"created_at":"2025-08-15T13:52:28.126Z","disk":25,"features":["private_networking"],"id":3164412,"image":{"created_at":"2025-08-15T13:52:28.126Z","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":"2025-08-15T13:52:28.126Z","start":"2025-08-15T13:52:28.126Z"},"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","tags":["env:stage"],"vcpus":1,"volume_ids":["7724db7c-e098-11e5-b522-000f53304e51"],"vpc_uuid":"5a4981aa-9653-4bd1-bef5-d6bff52042e4"}],"links":{"pages":{}},"meta":{"total":3}}},"Droplets Filtered By Tag":{"value":{"droplets":[{"backup_ids":[53893572],"created_at":"2025-08-15T13:52:28.131Z","disk":25,"features":["backups","private_networking","ipv6"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.131Z","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":"2025-08-15T13:52:28.131Z","start":"2025-08-15T13:52:28.131Z"},"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","tags":["web","env:prod"],"vcpus":1,"volume_ids":[],"vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"},{"backup_ids":[],"created_at":"2025-08-15T13:52:28.131Z","disk":25,"features":["private_networking"],"id":3164459,"image":{"created_at":"2025-08-15T13:52:28.131Z","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":"2025-08-15T13:52:28.131Z","start":"2025-08-15T13:52:28.131Z"},"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","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}}}},"schema":{"allOf":[{"properties":{"droplets":{"items":{"properties":{"backup_ids":{"description":"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.","example":[53893572],"items":{"type":"integer"},"type":"array"},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the Droplet was created.","example":"2025-08-15T13:52:28.131Z","format":"date-time","type":"string"},"disk":{"description":"The size of the Droplet's disk in gigabytes.","example":25,"type":"integer"},"features":{"description":"An array of features enabled on this Droplet.","example":["backups","private_networking","ipv6"],"items":{"type":"string"},"type":"array"},"id":{"description":"A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.","example":3164444,"type":"integer"},"image":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the image was created.","example":"2025-08-15T13:52:28.131Z","format":"date-time","type":"string"},"description":{"description":"An optional free-form text field to describe an image.","example":" ","type":"string"},"distribution":{"description":"The name of a custom image's distribution. Currently, the valid values are  `Arch Linux`, `CentOS`, `CoreOS`, `Debian`, `Fedora`, `Fedora Atomic`,  `FreeBSD`, `Gentoo`, `openSUSE`, `RancherOS`, `Rocky Linux`, `Ubuntu`, and `Unknown`.  Any other value will be accepted but ignored, and `Unknown` will be used in its place.","enum":["Arch Linux","CentOS","CoreOS","Debian","Fedora","Fedora Atomic","FreeBSD","Gentoo","openSUSE","RancherOS","Rocky Linux","Ubuntu","Unknown"],"example":"Ubuntu","type":"string"},"error_message":{"description":"A string containing information about errors that may occur when importing\n a custom image.","example":" ","type":"string"},"id":{"description":"A unique number that can be used to identify and reference a specific image.","example":7555620,"readOnly":true,"type":"integer"},"min_disk_size":{"description":"The minimum disk size in GB required for a Droplet to use this image.","example":20,"minimum":0,"nullable":true,"type":"integer"},"name":{"description":"The display name that has been given to an image.  This is what is shown in the control panel and is generally a descriptive title for the image in question.","example":"Nifty New Snapshot","type":"string"},"public":{"description":"This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account.","example":true,"type":"boolean"},"regions":{"description":"This attribute is an array of the regions that the image is available in. The regions are represented by their identifying slug values.","example":["nyc1","nyc2"],"items":{"description":"The slug identifier for the region where the resource will initially be  available.","enum":["ams1","ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"],"example":"nyc3","type":"string"},"type":"array"},"size_gigabytes":{"description":"The size of the image in gigabytes.","example":2.34,"format":"float","nullable":true,"type":"number"},"slug":{"description":"A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id.","example":"nifty1","nullable":true,"type":"string"},"status":{"description":"A status string indicating the state of a custom image. This may be `NEW`,\n `available`, `pending`, `deleted`, or `retired`.","enum":["NEW","available","pending","deleted","retired"],"example":"NEW","type":"string"},"tags":{"description":"A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.","example":["base-image","prod"],"items":{"type":"string"},"nullable":true,"type":"array"},"type":{"description":"Describes the kind of image. It may be one of `base`, `snapshot`, `backup`, `custom`, or `admin`. Respectively, this specifies whether an image is a DigitalOcean base OS image, user-generated Droplet snapshot, automatically created Droplet backup, user-provided virtual machine image, or an image used for DigitalOcean managed resources (e.g. DOKS worker nodes).","enum":["base","snapshot","backup","custom","admin"],"example":"snapshot","type":"string"}},"type":"object"},"kernel":{"deprecated":true,"description":"**Note**: All Droplets created after March 2017 use internal kernels by default.\nThese Droplets will have this attribute set to `null`.\n\nThe current [kernel](https://www.digitalocean.com/docs/droplets/how-to/kernel/)\nfor Droplets with externally managed kernels. This will initially be set to\nthe kernel of the base image when the Droplet is created.\n","nullable":true,"properties":{"id":{"description":"A unique number used to identify and reference a specific kernel.","example":7515,"type":"integer"},"name":{"description":"The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question.","example":"DigitalOcean GrubLoader v0.2 (20160714)","type":"string"},"version":{"description":"A standard kernel version string representing the version, patch, and release information.","example":"2016.07.13-DigitalOcean_loader_Ubuntu","type":"string"}},"type":"object"},"locked":{"description":"A boolean value indicating whether the Droplet has been locked, preventing actions by users.","example":false,"type":"boolean"},"memory":{"description":"Memory of the Droplet in megabytes.","example":1024,"multipleOf":8,"type":"integer"},"name":{"description":"The human-readable name set for the Droplet instance.","example":"example.com","type":"string"},"networks":{"description":"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.","properties":{"v4":{"items":{"properties":{"gateway":{"description":"The gateway of the specified IPv4 network interface.\n\nFor private interfaces, a gateway is not provided. This is denoted by\nreturning `nil` as its value.\n","example":"104.236.0.1","type":"string"},"ip_address":{"description":"The IP address of the IPv4 network interface.","example":"104.236.32.182","format":"ipv4","type":"string"},"netmask":{"description":"The netmask of the IPv4 network interface.","example":"255.255.192.0","format":"ipv4","type":"string"},"type":{"description":"The type of the IPv4 network interface.","enum":["public","private"],"example":"public","type":"string"}},"type":"object"},"type":"array"},"v6":{"items":{"properties":{"gateway":{"description":"The gateway of the specified IPv6 network interface.","example":"2604:a880:0:1010::1","format":"ipv6","type":"string"},"ip_address":{"description":"The IP address of the IPv6 network interface.","example":"2604:a880:0:1010::18a:a001","format":"ipv6","type":"string"},"netmask":{"description":"The netmask of the IPv6 network interface.","example":64,"type":"integer"},"type":{"description":"The type of the IPv6 network interface.\n\n**Note**: IPv6 private  networking is not currently supported.\n","enum":["public"],"example":"public","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"next_backup_window":{"description":"The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.","nullable":true,"properties":{"end":{"description":"A time value given in ISO8601 combined date and time format specifying the end of the Droplet's backup window.","example":"2025-08-15T13:52:28.131Z","format":"date-time","type":"string"},"start":{"description":"A time value given in ISO8601 combined date and time format specifying the start of the Droplet's backup window.","example":"2025-08-15T13:52:28.131Z","format":"date-time","type":"string"}},"type":"object"},"region":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"},"size":{"properties":{"available":{"default":true,"description":"This is a boolean value that represents whether new Droplets can be created with this size.","example":true,"type":"boolean"},"description":{"description":"A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.","example":"Basic","type":"string"},"disk":{"description":"The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.","example":25,"type":"integer"},"memory":{"description":"The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.","example":1024,"minimum":8,"multipleOf":8,"type":"integer"},"price_hourly":{"description":"This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.","example":0.00743999984115362,"format":"float","type":"number"},"price_monthly":{"description":"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.","example":5,"format":"float","type":"number"},"regions":{"description":"An array containing the region slugs where this size is available for Droplet creates.","example":["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"],"items":{"type":"string"},"type":"array"},"slug":{"description":"A human-readable string that is used to uniquely identify each size.","example":"s-1vcpu-1gb","type":"string"},"transfer":{"description":"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.","example":1,"format":"float","type":"number"},"vcpus":{"description":"The integer of number CPUs allocated to Droplets of this size.","example":1,"type":"integer"}},"required":["available","disk","memory","price_hourly","price_monthly","regions","slug","transfer","vcpus","description"],"type":"object"},"size_slug":{"description":"The unique slug identifier for the size of this Droplet.","example":"s-1vcpu-1gb","type":"string"},"snapshot_ids":{"description":"An array of snapshot IDs of any snapshots created from the Droplet instance.","example":[67512819],"items":{"type":"integer"},"type":"array"},"status":{"description":"A status string indicating the state of the Droplet instance. This may be \"new\", \"active\", \"off\", or \"archive\".","enum":["new","active","off","archive"],"example":"active","type":"string"},"tags":{"description":"An array of Tags the Droplet has been tagged with.","example":["web","env:prod"],"items":{"type":"string"},"type":"array"},"vcpus":{"description":"The number of virtual CPUs.","example":1,"type":"integer"},"volume_ids":{"description":"A flat array including the unique identifier for each Block Storage volume attached to the Droplet.","example":["506f78a4-e098-11e5-ad9f-000f53306ae1"],"items":{"type":"string"},"type":"array"},"vpc_uuid":{"description":"A string specifying the UUID of the VPC to which the Droplet is assigned.","example":"760e09ef-dc84-11e8-981e-3cfdfeaae000","type":"string"}},"required":["id","name","memory","vcpus","disk","locked","status","created_at","features","backup_ids","next_backup_window","snapshot_ids","image","volume_ids","size","size_slug","networks","region","tags"],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with a key of `droplets`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Droplets","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    droplets, _, err := client.Droplets.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ndroplets = client.droplets.all\ndroplets.each"}]},"post":{"description":"To create a new Droplet, send a POST request to `/v2/droplets` setting the\nrequired attributes.\n\nA Droplet will be created using the provided information. The response body\nwill contain a JSON object with a key called `droplet`. The value will be an\nobject containing the standard attributes for your new Droplet. The response\ncode, 202 Accepted, does not indicate the success or failure of the operation,\njust that the request has been accepted for processing. The `actions` returned\nas part of the response's `links` object can be used to check the status\nof the Droplet create event.\n\n### Create Multiple Droplets\n\nCreating multiple Droplets is very similar to creating a single Droplet.\nInstead of sending `name` as a string, send `names` as an array of strings. A\nDroplet will be created for each name you send using the associated\ninformation. Up to ten Droplets may be created this way at a time.\n\nRather than returning a single Droplet, the response body will contain a JSON\narray with a key called `droplets`. This will be set to an array of JSON\nobjects, each of which will contain the standard Droplet attributes. The\nresponse code, 202 Accepted, does not indicate the success or failure of any\noperation, just that the request has been accepted for processing. The array\nof `actions` returned as part of the response's `links` object can be used to\ncheck the status of each individual Droplet create event.\n","operationId":"droplets_create","requestBody":{"content":{"application/json":{"examples":{"Multiple Droplet Create Request":{"value":{"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"],"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n  - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"}},"Single Droplet Create Request":{"value":{"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"],"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n  - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"}}},"schema":{"oneOf":[{"allOf":[{"properties":{"name":{"description":"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.","example":"example.com","type":"string"}},"required":["name"],"type":"object"},{"properties":{"backups":{"default":false,"description":"A boolean indicating whether automated backups should be enabled for the Droplet.","example":true,"type":"boolean"},"image":{"description":"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.","example":"ubuntu-20-04-x64","oneOf":[{"type":"string"},{"type":"integer"}]},"ipv6":{"default":false,"description":"A boolean indicating whether to enable IPv6 on the Droplet.","example":true,"type":"boolean"},"monitoring":{"default":false,"description":"A boolean indicating whether to install the DigitalOcean agent for monitoring.","example":true,"type":"boolean"},"private_networking":{"default":false,"deprecated":true,"description":"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.","example":true,"type":"boolean"},"region":{"description":"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.","example":"nyc3","type":"string"},"size":{"description":"The slug identifier for the size that you wish to select for this Droplet.","example":"s-1vcpu-1gb","type":"string"},"ssh_keys":{"default":[],"description":"An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation.","example":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},"tags":{"default":[],"description":"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.","example":["env:prod","web"],"items":{"type":"string"},"nullable":true,"type":"array"},"user_data":{"description":"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.","example":"#cloud-config\nruncmd:\n  - touch /test.txt\n","type":"string"},"volumes":{"default":[],"description":"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.","example":["12e97116-7280-11ed-b3d0-0a58ac146812"],"items":{"type":"string"},"type":"array"},"vpc_uuid":{"description":"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.","example":"760e09ef-dc84-11e8-981e-3cfdfeaae000","type":"string"},"with_droplet_agent":{"description":"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`.","example":true,"type":"boolean"}},"required":["size","image"],"type":"object"}],"title":"Single Droplet Request"},{"allOf":[{"properties":{"names":{"description":"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.","example":["sub-01.example.com","sub-02.example.com"],"items":{"type":"string"},"type":"array"}},"required":["names"],"type":"object"},{"$ref":"#/paths/~1v2~1droplets/post/requestBody/content/application~1json/schema/oneOf/0/allOf/1"}],"title":"Multiple Droplet Request"}]}}}},"responses":{"202":{"content":{"application/json":{"examples":{"Multiple Droplet Create Response":{"value":{"droplets":[{"backup_ids":[],"created_at":"2025-08-15T13:52:28.132Z","disk":25,"features":["backups","private_networking","ipv6","monitoring"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.132Z","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":"2025-08-15T13:52:28.132Z","disk":25,"features":["backups","private_networking","ipv6","monitoring"],"id":3164445,"image":{"created_at":"2025-08-15T13:52:28.132Z","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"}]}}},"Single Droplet Create Response":{"value":{"droplet":{"backup_ids":[],"created_at":"2025-08-15T13:52:28.132Z","disk":25,"features":["backups","private_networking","ipv6","monitoring"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.132Z","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"}]}}}},"schema":{"oneOf":[{"properties":{"droplet":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"},"links":{"properties":{"actions":{"items":{"description":"The linked actions can be used to check the status of a Droplet's create event.","properties":{"href":{"description":"A URL that can be used to access the action.","example":"https://api.digitalocean.com/v2/actions/7515","format":"uri","type":"string"},"id":{"description":"A unique numeric ID that can be used to identify and reference an action.","example":7515,"type":"integer"},"rel":{"description":"A string specifying the type of the related action.","example":"create","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"required":["droplet","links"],"title":"Single Droplet Response"},{"properties":{"droplets":{"items":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"},"type":"array"},"links":{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1droplets/post/responses/202/content/application~1json/schema/oneOf/0/properties/links/properties/actions/items"},"type":"array"}},"type":"object"}},"required":["droplets","links"],"title":"Multiple Droplet Response"}]}}},"description":"Accepted","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -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\"}' \\\n  \"https://api.digitalocean.com/v2/droplets\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.DropletCreateRequest{\n        Name:   \"example.com\",\n        Region: \"nyc3\",\n        Size:   \"s-1vcpu-1gb\",\n        Image: godo.DropletCreateImage{\n            Slug: \"ubuntu-20-04-x64\",\n        },\n        SSHKeys: []godo.DropletCreateSSHKey{\n            godo.DropletCreateSSHKey{ID: 289794},\n            godo.DropletCreateSSHKey{Fingerprint: \"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45\"}\n        },\n        Backups: true,\n        IPv6: true,\n        Monitoring: true,\n        Tags: []string{\"env:prod\",\"web\"},\n        UserData: \"#cloud-config\\nruncmd:\\n  - touch /test.txt\\n\",\n        VPCUUID: \"760e09ef-dc84-11e8-981e-3cfdfeaae000\",\n    }"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ndroplet = DropletKit::Droplet.new(\n  name: 'example.com',\n  region: 'nyc3',\n  size: 's-1vcpu-1gb',\n  image: 'ubuntu-20-04-x64',\n  ssh_keys: [289794,\"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45\"],\n  backups: true,\n  ipv6: true,\n  monitoring: true,\n  tags: [\"env:prod\",\"web\"],\n  user_data: \"#cloud-config\\nruncmd:\\n  - touch /test.txt\\n\",\n  vpc_uuid: \"760e09ef-dc84-11e8-981e-3cfdfeaae000\",\n)\nclient.droplets.create(droplet)"}]}},"/v2/droplets/actions":{"post":{"description":"Some actions can be performed in bulk on tagged Droplets. The actions can be\ninitiated by sending a POST to `/v2/droplets/actions?tag_name=$TAG_NAME` with\nthe action arguments.\n\nOnly a sub-set of action types are supported:\n\n- `power_cycle`\n- `power_on`\n- `power_off`\n- `shutdown`\n- `enable_ipv6`\n- `enable_backups`\n- `disable_backups`\n- `snapshot`\n","operationId":"dropletActions_post_byTag","parameters":[{"$ref":"#/paths/~1v2~1droplets/get/parameters/2"}],"requestBody":{"content":{"application/json":{"schema":{"discriminator":{"mapping":{"disable_backups":"models/droplet_actions.yml#/droplet_action","enable_backups":"models/droplet_actions.yml#/droplet_action","enable_ipv6":"models/droplet_actions.yml#/droplet_action","power_cycle":"models/droplet_actions.yml#/droplet_action","power_off":"models/droplet_actions.yml#/droplet_action","power_on":"models/droplet_actions.yml#/droplet_action","shutdown":"models/droplet_actions.yml#/droplet_action","snapshot":"models/droplet_actions.yml#/droplet_action_snapshot"},"propertyName":"type"},"oneOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/6"}]}}},"description":"The `type` attribute set in the request body will specify the  action that\nwill be taken on the Droplet. Some actions will require additional\nattributes to be set as well.\n"},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},"type":"array"}}}}},"description":"The response will be a JSON object with a key called `actions`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Acting on Tagged Droplets","tags":["Droplet Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"enable_backups\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/actions?tag_name=awesome\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.DropletActions.PowerOffByTag(ctx, \"awesome\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.droplet_actions.power_off_for_tag(tag: 'awesome')"}]}},"/v2/droplets/{droplet_id}":{"delete":{"description":"To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"droplets_destroy","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1droplets/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an Existing Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Droplets.Delete(ctx, 3164494)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.droplets.delete(id: 3164494)"}]},"get":{"description":"To show information about an individual Droplet, send a GET request to\n`/v2/droplets/$DROPLET_ID`.\n","operationId":"droplets_get","parameters":[{"description":"A unique identifier for a Droplet instance.","example":3164444,"in":"path","name":"droplet_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"Single Droplet":{"value":{"droplet":{"backup_ids":[53893572],"created_at":"2025-08-15T13:52:28.132Z","disk":25,"features":["backups","private_networking","ipv6"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.132Z","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":"2025-08-15T13:52:28.132Z","start":"2025-08-15T13:52:28.132Z"},"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","tags":["web","env:prod"],"vcpus":1,"volume_ids":[],"vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"}}}},"schema":{"properties":{"droplet":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"}}}}},"description":"The response will be a JSON object with a key called `droplet`. This will be\nset to a JSON object that contains the standard Droplet attributes.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    droplet, _, err := client.Droplets.Get(ctx, 3164494)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.droplets.find(id: 3164494)"}]}},"/v2/droplets/{droplet_id}/actions":{"get":{"description":"To retrieve a list of all actions that have been executed for a Droplet, send\na GET request to `/v2/droplets/$DROPLET_ID/actions`.\n\nThe results will be returned as a JSON object with an `actions` key. This will\nbe set to an array filled with `action` objects containing the standard\n`action` attributes.\n","operationId":"dropletActions_list","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"actions":[{"completed_at":"2025-08-15T13:52:28.132Z","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":"2025-08-15T13:52:28.132Z","status":"completed","type":"create"}],"links":{},"meta":{"total":1}},"schema":{"allOf":[{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with an `actions` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Actions for a Droplet","tags":["Droplet Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    actions, _, err := client.Droplets.Actions(ctx, 3164494, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nactions = client.droplets.actions(id: 3164494)\nactions.each"}]},"post":{"description":"To initiate an action on a Droplet send a POST request to\n`/v2/droplets/$DROPLET_ID/actions`. In the JSON body to the request,\nset the `type` attribute to on of the supported action types:\n\n| Action                                   | Details |\n| ---------------------------------------- | ----------- |\n| <nobr>`enable_backups`</nobr>            | Enables backups for a Droplet |\n| <nobr>`disable_backups`</nobr>           | Disables backups for a Droplet |\n| <nobr>`reboot`</nobr>                    | 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. |\n| <nobr>`power_cycle`</nobr>               | 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. |\n| <nobr>`shutdown`</nobr>                  | Shutsdown 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. |\n| <nobr>`power_off`</nobr>                 | 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. |\n| <nobr>`power_on`</nobr>                  | Powers on a Droplet. |\n| <nobr>`restore`</nobr>                   | 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. |\n| <nobr>`password_reset`</nobr>            | Resets the root password for a Droplet. A new password will be provided via email. It must be changed after first use. |\n| <nobr>`resize`</nobr>                    | 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`. |\n| <nobr>`rebuild`</nobr>                   | Rebuilds a Droplet from a new base image. Set the `image` attribute to an image ID or slug. |\n| <nobr>`rename`</nobr>                    | Renames a Droplet. |\n| <nobr>`change_kernel`</nobr>             | Changes a Droplet's kernel. Only applies to Droplets with externally managed kernels. All Droplets created after March 2017 use internal kernels by default. |\n| <nobr>`enable_ipv6`</nobr>               | Enables IPv6 for a Droplet. |\n| <nobr>`snapshot`</nobr>                  | Takes a snapshot of a Droplet. |\n","operationId":"dropletActions_post","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"description":"Specifies the action that will be taken on the Droplet.","properties":{"type":{"description":"The type of action to initiate for the Droplet.","enum":["enable_backups","disable_backups","reboot","power_cycle","shutdown","power_off","power_on","restore","password_reset","resize","rebuild","rename","change_kernel","enable_ipv6","snapshot"],"example":"reboot","type":"string"}},"required":["type"],"type":"object"},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"image":{"description":"The ID of a backup of the current Droplet instance to restore from.","example":12389723,"type":"integer"}},"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"disk":{"description":"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.","example":true,"type":"boolean"},"size":{"description":"The slug identifier for the size to which you wish to resize the Droplet.","example":"s-2vcpu-2gb","type":"string"}},"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"image":{"description":"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.","example":"ubuntu-20-04-x64","oneOf":[{"type":"string"},{"type":"integer"}]}},"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"name":{"description":"The new name for the Droplet.","example":"nifty-new-name","type":"string"}},"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"kernel":{"description":"A unique number used to identify and reference a specific kernel.","example":12389723,"type":"integer"}},"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"name":{"description":"The name to give the new snapshot of the Droplet.","example":"Nifty New Snapshot","type":"string"}},"type":"object"}]}],"discriminator":{"mapping":{"change_kernel":"models/droplet_actions.yml#/droplet_action_change_kernel","disable_backups":"models/droplet_actions.yml#/droplet_action","enable_backups":"models/droplet_actions.yml#/droplet_action","enable_ipv6":"models/droplet_actions.yml#/droplet_action","password_reset":"models/droplet_actions.yml#/droplet_action","power_cycle":"models/droplet_actions.yml#/droplet_action","power_off":"models/droplet_actions.yml#/droplet_action","power_on":"models/droplet_actions.yml#/droplet_action","reboot":"models/droplet_actions.yml#/droplet_action","rebuild":"models/droplet_actions.yml#/droplet_action_rebuild","rename":"models/droplet_actions.yml#/droplet_action_rename","resize":"models/droplet_actions.yml#/droplet_action_resize","restore":"models/droplet_actions.yml#/droplet_action_restore","shutdown":"models/droplet_actions.yml#/droplet_action","snapshot":"models/droplet_actions.yml#/droplet_action_snapshot"},"propertyName":"type"}}}},"description":"The `type` attribute set in the request body will specify the  action that\nwill be taken on the Droplet. Some actions will require additional\nattributes to be set as well.\n"},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"action":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"}}}}},"description":"The response will be a JSON object with a key called `action`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate a Droplet Action","tags":["Droplet Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Enable Backups\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"enable_backups\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Disable Backups\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"disable_backups\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Reboot a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"reboot\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Power cycle a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"power_cycle\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Shutdown and Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"shutdown\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3067649/actions\"\n\n# Power off a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"power_off\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Power on a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"power_on\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Restore a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"restore\", \"image\": 12389723 }' \\\n  \"https://api.digitalocean.com/v2/droplets/3067649/actions\"\n\n# Password Reset a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"password_reset\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Resize a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"resize\",\"size\":\"1gb\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Rebuild a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"rebuild\",\"image\":\"ubuntu-16-04-x64\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Rename a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"rename\",\"name\":\"nifty-new-name\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Change the Kernel\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"change_kernel\",\"kernel\":991}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Enable IPv6\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"enable_ipv6\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Enable Private Networking\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"enable_private_networking\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Snapshot a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"snapshot\",\"name\":\"Nifty New Snapshot\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/3164450/actions\"\n\n# Acting on Tagged Droplets\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"enable_backups\"}' \\\n  \"https://api.digitalocean.com/v2/droplets/actions?tag_name=awesome\"\n\n# Retrieve a Droplet Action\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164444/actions/36804807\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n// Enable Backups\n    action, _, err := client.DropletActions.EnableBackups(ctx, 3164450)\n\n// Disable Backups\n//  action, _, err := client.DropletActions.DisableBackups(ctx, 3164450)\n\n// Reboot a Droplet\n//  action, _, err := client.DropletActions.Reboot(ctx, 3164450)\n\n// Power Cycle a Droplet\n//  action, _, err := client.DropletActions.PowerCycle(ctx, 3164450)\n\n// Shutdown a Droplet\n//  action, _, err := client.DropletActions.Shutdown(ctx, 3067649)\n\n// Power Off a Droplet\n//  action, _, err := client.DropletActions.PowerOff(ctx, 3164450)\n\n// Power On a Droplet\n//  action, _, err := client.DropletActions.PowerOn(ctx, 3164450)\n\n// Restore a Droplet\n//  action, _, err := client.DropletActions.Restore(ctx, 3164449, 12389723)\n\n// Password Reset a Droplet\n//  action, _, err := client.DropletActions.PasswordReset(ctx, 3164450)\n\n// Resize a Droplet\n//  action, _, err := client.DropletActions.Resize(ctx, 3164450, \"1gb\", true)\n\n// Rebuild a Droplet\n//  action, _, err := client.DropletActions.RebuildByImageSlug(ctx, 3164450, \"ubuntu-16-04-x64\")\n\n// Rename a Droplet\n//  action, _, err := client.DropletActions.Rename(ctx, 3164450, \"nifty-new-name\")\n\n// Change the Kernel\n//  action, _, err := client.DropletActions.ChangeKernel(ctx, 3164450, 991)\n\n// Enable IPv6\n//  action, _, err := client.DropletActions.EnableIPv6(ctx, 3164450)\n\n// Enable Private Networking\n//  action, _, err := client.DropletActions.EnablePrivateNetworking(ctx, 3164450)\n\n// Snapshot a Droplet\n//  action, _, err := client.DropletActions.Snapshot(ctx, 3164450, \"Nifty New Snapshot\")\n\n// Retrieve a Droplet Action\n//  action, _, err := client.DropletActions.Get(ctx, 3164450, 36804807)\n\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Enable Backups\nclient.droplet_actions.enable_backups(droplet_id: 3164450)\n\n# Disable Backups\n# client.droplet_actions.disable_backups(droplet_id: 3164450)\n\n# Reboot a Droplet\n# client.droplet_actions.reboot(droplet_id: 3164450)\n\n# Power Cycle a Droplet\n# client.droplet_actions.power_cycle(droplet_id: 3164450)\n\n# Shutdown a Droplet\n# client.droplet_actions.shutdown(droplet_id: 3067649)\n\n# Power Off a Droplet\n# client.droplet_actions.power_off(droplet_id: 3164450)\n\n# Power On a Droplet\n# client.droplet_actions.power_on(droplet_id: 3164450)\n\n# Restore a Droplet\n# client.droplet_actions.restore(droplet_id: 3067649, image: 12389723)\n\n# Password Reset a Droplet\n# client.droplet_actions.password_reset(droplet_id: 3164450)\n\n# Resize a Droplet\n# client.droplet_actions.resize(droplet_id: 3164450, size: '1gb')\n\n# Rebuild a Droplet\n# client.droplet_actions.rebuild(droplet_id: 3164450, image: 'ubuntu-16-04-x64')\n\n# Rename a Droplet\n# client.droplet_actions.rename(droplet_id: 3164450, name: 'nifty-new-name')\n\n# Change the Kernel\n# client.droplet_actions.change_kernel(droplet_id: 3164450, kernel: 991)\n\n# Enable IPv6\n# client.droplet_actions.enable_ipv6(droplet_id: 3164450)\n\n# Enable Private Networking\n# client.droplet_actions.enable_private_networking(droplet_id: 3164450)\n\n# Snapshot a Droplet\n# client.droplet_actions.snapshot(droplet_id: 3164450, name: 'Nifty New Snapshot')"}]}},"/v2/droplets/{droplet_id}/actions/{action_id}":{"get":{"description":"To retrieve a Droplet action, send a GET request to\n`/v2/droplets/$DROPLET_ID/actions/$ACTION_ID`.\n\nThe response will be a JSON object with a key called `action`. The value will\nbe a Droplet action object.\n","operationId":"dropletActions_get","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/parameters/0"}],"responses":{"200":{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve a Droplet Action","tags":["Droplet Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164444/actions/36804807\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.DropletActions.Get(ctx, 3164450, 36804807)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.droplet_actions.find(droplet_id: 3164444, id: 36804807)"}]}},"/v2/droplets/{droplet_id}/backups":{"get":{"description":"To retrieve any backups associated with a Droplet, send a GET request to\n`/v2/droplets/$DROPLET_ID/backups`.\n\nYou will get back a JSON object that has a `backups` key. This will be set to\nan array of backup objects, each of which contain the standard\nDroplet backup attributes.\n","operationId":"droplets_list_backups","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"backups":[{"created_at":"2025-08-15T13:52:28.132Z","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}},"schema":{"allOf":[{"properties":{"backups":{"items":{"allOf":[{"properties":{"id":{"description":"The unique identifier for the snapshot or backup.","example":6372321,"type":"integer"}},"required":["id"],"type":"object"},{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the snapshot was created.","example":"2025-08-15T13:52:28.133Z","format":"date-time","type":"string"},"min_disk_size":{"description":"The minimum size in GB required for a volume or Droplet to use this snapshot.","example":25,"type":"integer"},"name":{"description":"A human-readable name for the snapshot.","example":"web-01-1595954862243","type":"string"},"regions":{"description":"An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values.","example":["nyc3","sfo3"],"items":{"type":"string"},"type":"array"},"size_gigabytes":{"description":"The billable size of the snapshot in gigabytes.","example":2.34,"format":"float","type":"number"}},"required":["name","created_at","regions","min_disk_size","size_gigabytes"],"type":"object"},{"properties":{"type":{"description":"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.","enum":["snapshot","backup"],"example":"snapshot","type":"string"}},"required":["type"],"type":"object"}]},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with an `backups` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Backups for a Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3067509/backups\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    backups, _, err := client.Droplets.Backups(ctx, 3164494, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nbackups = client.droplets.backups(id: 3164494)\nbackups.each"}]}},"/v2/droplets/{droplet_id}/destroy_with_associated_resources":{"get":{"description":"To list the associated billable resources that can be destroyed along with a\nDroplet, send a GET request to the\n`/v2/droplets/$DROPLET_ID/destroy_with_associated_resources` endpoint.\n\nThe response will be a JSON object containing `snapshots`, `volumes`, and\n`volume_snapshots` keys. Each will be set to an array of objects containing\ninformation about the associated resources.\n","operationId":"droplets_list_associatedResources","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"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"}]},"schema":{"allOf":[{"properties":{"floating_ips":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"},"type":"array"},"reserved_ips":{"items":{"description":"An objects containing information about a resource associated with a Droplet.","properties":{"cost":{"description":"The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed.","example":"0.05","type":"string"},"id":{"description":"The unique identifier for the resource associated with the Droplet.","example":"61486916","type":"string"},"name":{"description":"The name of the resource associated with the Droplet.","example":"ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330","type":"string"}},"type":"object"},"type":"array"},"snapshots":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"},"type":"array"},"volume_snapshots":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"},"type":"array"},"volumes":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"},"type":"array"}},"type":"object"}]}}},"description":"A JSON object containing `snapshots`, `volumes`, and `volume_snapshots` keys.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Associated Resources for a Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources\""}]}},"/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous":{"delete":{"description":"To destroy a Droplet along with all of its associated resources, send a DELETE\nrequest to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous`\nendpoint. The headers of this request must include an `X-Dangerous` key set to\n`true`. To preview which resources will be destroyed, first query the\nDroplet's associated resources. This operation _can not_ be reverse and should\nbe used with caution.\n\nA successful response will include a 202 response code and no content. Use the\nstatus endpoint to check on the success or failure of the destruction of the\nindividual resources.\n","operationId":"droplets_destroy_withAssociatedResourcesDangerous","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"description":"Acknowledge this action will destroy the Droplet and all associated resources and _can not_ be reversed.","example":true,"in":"header","name":"X-Dangerous","required":true,"schema":{"type":"boolean"}}],"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Destroy a Droplet and All of its Associated Resources (Dangerous)","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE -H \"X-Dangerous: true\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/187000742/destroy_with_associated_resources/dangerous\""}]}},"/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry":{"post":{"description":"If the status of a request to destroy a Droplet with its associated resources\nreported any errors, it can be retried by sending a POST request to the\n`/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/retry` endpoint.\n\nOnly one destroy can be active at a time per Droplet. If a retry is issued\nwhile another destroy is in progress for the Droplet a 409 status code will\nbe returned. A successful response will include a 202 response code and no\ncontent.\n","operationId":"droplets_destroy_retryWithAssociatedResources","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"409":{"content":{"application/json":{"example":{"id":"conflict","message":"The request could not be completed due to a conflict."},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Conflict","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retry a Droplet Destroy with Associated Resources Request","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources/retry\""}]}},"/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective":{"delete":{"description":"To destroy a Droplet along with a sub-set of its associated resources, send a\nDELETE request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective`\nendpoint. The JSON body of the request should include `reserved_ips`, `snapshots`, `volumes`,\nor `volume_snapshots` keys each set to an array of IDs for the associated\nresources to be destroyed. The IDs can be found by querying the Droplet's\nassociated resources. Any associated resource not included in the request\nwill remain and continue to accrue changes on your account.\n\nA successful response will include a 202 response code and no content. Use\nthe status endpoint to check on the success or failure of the destruction of\nthe individual resources.\n","operationId":"droplets_destroy_withAssociatedResourcesSelective","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"description":"An object containing information about a resource to be scheduled for deletion.","properties":{"floating_ips":{"deprecated":true,"description":"An array of unique identifiers for the floating IPs to be scheduled for deletion.","example":["6186916"],"items":{"type":"string"},"type":"array"},"reserved_ips":{"description":"An array of unique identifiers for the reserved IPs to be scheduled for deletion.","example":["6186916"],"items":{"type":"string"},"type":"array"},"snapshots":{"description":"An array of unique identifiers for the snapshots to be scheduled for deletion.","example":["61486916"],"items":{"type":"string"},"type":"array"},"volume_snapshots":{"description":"An array of unique identifiers for the volume snapshots to be scheduled for deletion.","example":["edb0478d-7436-11ea-86e6-0a58ac144b91"],"items":{"type":"string"},"type":"array"},"volumes":{"description":"An array of unique identifiers for the volumes to be scheduled for deletion.","example":["ba49449a-7435-11ea-b89e-0a58ac14480f"],"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Selectively Destroy a Droplet and its Associated Resources","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"reserved_ips\":[\"6186916\"],\"snapshots\": [\"61486916\"],\"volumes\": [\"ba49449a-7435-11ea-b89e-0a58ac14480f\"],\"volume_snapshots\": [\"edb0478d-7436-11ea-86e6-0a58ac144b91\"]}' \\\n  \"https://api.digitalocean.com/v2/droplets/187000742/destroy_with_associated_resources/selective\""}]}},"/v2/droplets/{droplet_id}/destroy_with_associated_resources/status":{"get":{"description":"To check on the status of a request to destroy a Droplet with its associated\nresources, send a GET request to the\n`/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/status` endpoint.\n","operationId":"droplets_get_DestroyAssociatedResourcesStatus","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"completed_at":"2025-08-15T13:52:28.133Z","droplet":{"destroyed_at":"2025-08-15T13:52:28.133Z","id":"187000742","name":"ubuntu-s-1vcpu-1gb-nyc1-01"},"failures":0,"resources":{"floating_ips":[{"destroyed_at":"2025-08-15T13:52:28.133Z","id":"6186916","name":"45.55.96.47"}],"reserved_ips":[{"destroyed_at":"2025-08-15T13:52:28.133Z","id":"6186916","name":"45.55.96.47"}],"snapshots":[{"destroyed_at":"2025-08-15T13:52:28.133Z","id":"61486916","name":"ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330"}],"volume_snapshots":[{"destroyed_at":"2025-08-15T13:52:28.133Z","id":"edb0478d-7436-11ea-86e6-0a58ac144b91","name":"volume-nyc1-01-1585758983629"}],"volumes":[]}},"schema":{"description":"An objects containing information about a resources scheduled for deletion.","properties":{"completed_at":{"description":"A time value given in ISO8601 combined date and time format indicating when the requested action was completed.","example":"2025-08-15T13:52:28.133Z","format":"date-time","type":"string"},"droplet":{"description":"An object containing information about a resource scheduled for deletion.","properties":{"destroyed_at":{"description":"A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful.","example":"2025-08-15T13:52:28.133Z","format":"date-time","type":"string"},"error_message":{"description":"A string indicating that the resource was not successfully destroyed and providing additional information.","example":" ","type":"string"},"id":{"description":"The unique identifier for the resource scheduled for deletion.","example":"61486916","type":"string"},"name":{"description":"The name of the resource scheduled for deletion.","example":"ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330","type":"string"}},"type":"object"},"failures":{"description":"A count of the associated resources that failed to be destroyed, if any.","example":0,"type":"integer"},"resources":{"description":"An object containing additional information about resource related to a Droplet requested to be destroyed.","properties":{"floating_ips":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1status/get/responses/200/content/application~1json/schema/properties/droplet"},"type":"array"},"reserved_ips":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1status/get/responses/200/content/application~1json/schema/properties/droplet"},"type":"array"},"snapshots":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1status/get/responses/200/content/application~1json/schema/properties/droplet"},"type":"array"},"volume_snapshots":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1status/get/responses/200/content/application~1json/schema/properties/droplet"},"type":"array"},"volumes":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1status/get/responses/200/content/application~1json/schema/properties/droplet"},"type":"array"}},"type":"object"}},"type":"object"}}},"description":"A JSON object containing containing the status of a request to destroy a Droplet and its associated resources.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Check Status of a Droplet Destroy with Associated Resources Request","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources/status\""}]}},"/v2/droplets/{droplet_id}/firewalls":{"get":{"description":"To retrieve a list of all firewalls available to a Droplet, send a GET request\nto `/v2/droplets/$DROPLET_ID/firewalls`\n\nThe response will be a JSON object that has a key called `firewalls`. This will\nbe set to an array of `firewall` objects, each of which contain the standard\n`firewall` attributes.\n","operationId":"droplets_list_firewalls","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"firewalls":[{"created_at":"2025-08-15T13:52:28.134Z","droplet_ids":[89989,33322],"id":"bb4b2611-3d72-467b-8602-280330ecd65c","inbound_rules":[{"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":[{"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}},"schema":{"allOf":[{"properties":{"firewalls":{"items":{"allOf":[{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the firewall was created.","example":"2025-08-15T13:52:28.134Z","format":"date-time","readOnly":true,"type":"string"},"droplet_ids":{"description":"An array containing the IDs of the Droplets assigned to the firewall.","example":[8043964],"items":{"type":"integer"},"nullable":true,"type":"array"},"id":{"description":"A unique ID that can be used to identify and reference a firewall.","example":"bb4b2611-3d72-467b-8602-280330ecd65c","readOnly":true,"type":"string"},"name":{"description":"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 (-).","example":"firewall","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\.-]+$","type":"string"},"pending_changes":{"description":"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.","example":[{"droplet_id":8043964,"removing":false,"status":"waiting"}],"items":{"properties":{"droplet_id":{"example":8043964,"type":"integer"},"removing":{"example":false,"type":"boolean"},"status":{"example":"waiting","type":"string"}},"type":"object"},"readOnly":true,"type":"array"},"status":{"description":"A status string indicating the current state of the firewall. This can be \"waiting\", \"succeeded\", or \"failed\".","enum":["waiting","succeeded","failed"],"example":"waiting","readOnly":true,"type":"string"},"tags":{"allOf":[{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"},{"description":"An array containing the names of the Tags assigned to the firewall.","example":"gateway"}]}}},{"properties":{"inbound_rules":{"items":{"allOf":[{"properties":{"ports":{"description":"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\".","example":"8000","type":"string"},"protocol":{"description":"The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`.","enum":["tcp","udp","icmp"],"example":"tcp","type":"string"}},"required":["protocol","ports"],"type":"object"},{"properties":{"sources":{"allOf":[{"properties":{"addresses":{"description":"An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will allow traffic.","example":["1.2.3.4","18.0.0.0/8"],"items":{"type":"string"},"type":"array"},"droplet_ids":{"description":"An array containing the IDs of the Droplets to which the firewall will allow traffic.","example":[8043964],"items":{"type":"integer"},"type":"array"},"kubernetes_ids":{"description":"An array containing the IDs of the Kubernetes clusters to which the firewall will allow traffic.","example":["41b74c5d-9bd0-5555-5555-a57c495b81a3"],"items":{"type":"string"},"type":"array"},"load_balancer_uids":{"description":"An array containing the IDs of the load balancers to which the firewall will allow traffic.","example":["4de7ac8b-495b-4884-9a69-1050c6793cd6"],"items":{"type":"string"},"type":"array"},"tags":{"allOf":[{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"},{"description":"An array containing the names of Tags corresponding to groups of Droplets to which the firewall will allow traffic.","example":["frontend"]}]}},"type":"object"},{"description":"An object specifying locations from which inbound traffic will be accepted."}]}},"required":["sources"]}]},"nullable":true,"type":"array"},"outbound_rules":{"items":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items/allOf/1/properties/inbound_rules/items/allOf/0"},{"properties":{"destinations":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items/allOf/1/properties/inbound_rules/items/allOf/1/properties/sources/allOf/0"},{"description":"An object specifying locations to which outbound traffic that will be allowed."}]}},"required":["destinations"]}]},"nullable":true,"type":"array"}},"type":"object"}],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object that has a key called `firewalls`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List all Firewalls Applied to a Droplet","tags":["Droplets"]}},"/v2/droplets/{droplet_id}/kernels":{"get":{"description":"To retrieve a list of all kernels available to a Droplet, send a GET request\nto `/v2/droplets/$DROPLET_ID/kernels`\n\nThe response will be a JSON object that has a key called `kernels`. This will\nbe set to an array of `kernel` objects, each of which contain the standard\n`kernel` attributes.\n","operationId":"droplets_list_kernels","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"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&per_page=1","next":"https://api.digitalocean.com/v2/droplets/3164444/kernels?page=2&per_page=1"}},"meta":{"total":171}},"schema":{"allOf":[{"properties":{"kernels":{"items":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/kernel"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object that has a key called `kernels`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Available Kernels for a Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/kernels?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    kernels, _, err := client.Droplets.Kernels(ctx, 3164494, opt) \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nkernels = client.droplets.kernels(id: 3164494)\nkernels.each"}]}},"/v2/droplets/{droplet_id}/neighbors":{"get":{"description":"To retrieve a list of any \"neighbors\" (i.e. Droplets that are co-located on\nthe same physical hardware) for a specific Droplet, send a GET request to\n`/v2/droplets/$DROPLET_ID/neighbors`.\n\nThe results will be returned as a JSON object with a key of `droplets`. This\nwill be set to an array containing objects representing any other Droplets\nthat share the same physical hardware. An empty array indicates that the\nDroplet is not co-located any other Droplets associated with your account.\n","operationId":"droplets_list_neighbors","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"droplets":{"items":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"},"type":"array"}},"type":"object"}]}}},"description":"A JSON object with an `droplets` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Neighbors for a Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/neighbors\""}]}},"/v2/droplets/{droplet_id}/snapshots":{"get":{"description":"To retrieve the snapshots that have been created from a Droplet, send a GET\nrequest to `/v2/droplets/$DROPLET_ID/snapshots`.\n\nYou will get back a JSON object that has a `snapshots` key. This will be set\nto an array of snapshot objects, each of which contain the standard Droplet\nsnapshot attributes.\n","operationId":"droplets_list_snapshots","parameters":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"links":{},"meta":{"total":1},"snapshots":[{"created_at":"2025-08-15T13:52:28.134Z","id":6372321,"min_disk_size":25,"name":"web-01-1595954862243","regions":["nyc3","sfo3"],"size_gigabytes":2.34,"type":"snapshot"}]},"schema":{"allOf":[{"properties":{"snapshots":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1backups/get/responses/200/content/application~1json/schema/allOf/0/properties/backups/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with an `snapshots` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Snapshots for a Droplet","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/droplets/3164494/snapshots?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    snapshots, _, err := client.Droplets.Snapshots(ctx, 3164494, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nsnapshots = client.droplets.snapshots(id: 3164494)\nsnapshots.each"}]}},"/v2/firewalls":{"get":{"description":"To list all of the firewalls available on your account, send a GET request to `/v2/firewalls`.","operationId":"firewalls_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"firewalls":[{"created_at":"2025-08-15T13:52:28.134Z","droplet_ids":[8043964],"id":"fb6045f1-cf1d-4ca3-bfac-18832663025b","inbound_rules":[{"ports":"80","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"firewall","outbound_rules":[{"destinations":{"addresses":["0.0.0.0/0","::/0"]},"ports":"80","protocol":"tcp"}],"pending_changes":[],"status":"succeeded","tags":[]}],"links":{},"meta":{"total":1}},"schema":{"allOf":[{"properties":{"firewalls":{"items":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"To list all of the firewalls available on your account, send a GET request to `/v2/firewalls`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Firewalls","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/firewalls\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    firewalls, _, err := client.Firewalls.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nfirewalls = client.firewalls.all\nfirewalls.each"}]},"post":{"description":"To create a new firewall, send a POST request to `/v2/firewalls`. The request\nmust contain at least one inbound or outbound access rule.\n","operationId":"firewalls_create","requestBody":{"content":{"application/json":{"example":{"droplet_ids":[8043964],"inbound_rules":[{"ports":"80","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"firewall","outbound_rules":[{"destinations":{"addresses":["0.0.0.0/0","::/0"]},"ports":"80","protocol":"tcp"}]},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"},{"required":["name"]},{"anyOf":[{"required":["inbound_rules"],"title":"Inbound Rules"},{"required":["outbound_rules"],"title":"Outbound Rules"}]}]}}}},"responses":{"202":{"content":{"application/json":{"example":{"firewall":{"created_at":"2025-08-15T13:52:28.134Z","droplet_ids":[8043964],"id":"bb4b2611-3d72-467b-8602-280330ecd65c","inbound_rules":[{"ports":"80","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"firewall","outbound_rules":[{"destinations":{"addresses":["0.0.0.0/0","::/0"]},"ports":"80","protocol":"tcp"}],"pending_changes":[{"droplet_id":8043964,"removing":false,"status":"waiting"}],"status":"waiting","tags":[]}},"schema":{"properties":{"firewall":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"}}}}},"description":"The response will be a JSON object with a firewall key. This will be set to an object containing the standard firewall attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"content":{"application/json":{"example":{"id":"bad_request","message":"error parsing request body","request_id":"4851a473-1621-42ea-b2f9-5071c0ea8414"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Bad Request","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"firewall\",\"inbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"80\",\"sources\":{\"load_balancer_uids\": [\"4de7ac8b-495b-4884-9a69-1050c6793cd6\"]}},{\"protocol\": \"tcp\",\"ports\": \"22\",\"sources\":{\"tags\": [\"gateway\"],\"addresses\": [\"18.0.0.0/8\"]}}],\"outbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"80\",\"destinations\":{\"addresses\":[\"0.0.0.0/0\",\"::/0\"]}}],\"droplet_ids\":[8043964]}' \\\n  \"https://api.digitalocean.com/v2/firewalls\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.FirewallRequest{\n        Name: 'firewall',\n        InboundRules: []godo.InboundRule{\n            {\n                Protocol: 'tcp',\n                PortRange: '80',\n                Sources: &godo.Sources{\n                    LoadBalancerUIDs: []string{'4de7ac8b-495b-4884-9a69-1050c6793cd6'},\n                },\n            },\n            {\n                Protocol:  'tcp',\n                PortRange: '22',\n                Sources: &godo.Sources{\n                    Addresses: []string{'18.0.0.0/8'},\n                    Tags: []string{'gateway'},\n                },\n            },\n        },\n        OutboundRules: []godo.OutboundRule{\n            {\n                Protocol: 'tcp',\n                PortRange: '80',\n                Destinations: &godo.Destinations{\n                    Addresses: []string{'0.0.0.0/0', '::/0'},\n                },\n            },\n        },\n        DropletIDs: []int{8043964},\n    }\n\n    firewall, req, err := client.Firewalls.Create(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nfirewall = DropletKit::Firewall.new(\n  name: 'firewall',\n  inbound_rules: [\n    DropletKit::FirewallInboundRule.new(\n      protocol: 'tcp',\n      ports: '80',\n      sources: {\n        load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6']\n      }\n    ),\n    DropletKit::FirewallInboundRule.new(\n      protocol: 'tcp',\n      ports: '22',\n      sources: {\n        tags: ['gateway'],\n        addresses: ['18.0.0.0/8']\n      }\n    )\n  ],\n  outbound_rules: [\n    DropletKit::FirewallOutboundRule.new(\n      protocol: 'tcp',\n      ports: '80',\n      destinations: {\n        addresses: ['0.0.0.0/0', '::/0'],\n      }\n    )\n  ],\n  droplet_ids: [8043964]\n)\n\nclient.firewalls.create(firewall)"}]}},"/v2/firewalls/{firewall_id}":{"delete":{"description":"To delete a firewall send a DELETE request to `/v2/firewalls/$FIREWALL_ID`.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_delete","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Firewalls.Delete(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.delete(id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]},"get":{"description":"To show information about an existing firewall, send a GET request to `/v2/firewalls/$FIREWALL_ID`.","operationId":"firewalls_get","parameters":[{"description":"A unique ID that can be used to identify and reference a firewall.","example":"bb4b2611-3d72-467b-8602-280330ecd65c","in":"path","name":"firewall_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"firewall":{"created_at":"2025-08-15T13:52:28.134Z","droplet_ids":[8043964],"id":"bb4b2611-3d72-467b-8602-280330ecd65c","inbound_rules":[{"ports":"80","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"firewall","outbound_rules":[{"destinations":{"addresses":["0.0.0.0/0","::/0"]},"ports":"80","protocol":"tcp"}],"pending_changes":[],"status":"succeeded","tags":[]}},"schema":{"properties":{"firewall":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"}}}}},"description":"The response will be a JSON object with a firewall key. This will be set to an object containing the standard firewall attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    firewall, _, err := client.Firewalls.Get(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.find(id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]},"put":{"description":"To update the configuration of an existing firewall, send a PUT request to\n`/v2/firewalls/$FIREWALL_ID`. The request should contain a full representation\nof the firewall including existing attributes. **Note that any attributes that\nare not provided will be reset to their default values.**\n","operationId":"firewalls_update","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"droplet_ids":[8043964],"inbound_rules":[{"ports":"8080","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"frontend-firewall","outbound_rules":[{"destinations":{"addresses":["0.0.0.0/0","::/0"]},"ports":"8080","protocol":"tcp"}],"tags":["frontend"]},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"},{"anyOf":[{"required":["inbound_rules"],"title":"Inbound Rules"},{"required":["outbound_rules"],"title":"Outbound Rules"}]}],"required":["name"]}}}},"responses":{"200":{"content":{"application/json":{"example":{"firewall":{"created_at":"2025-08-15T13:52:28.134Z","droplet_ids":[8043964],"id":"bb4b2611-3d72-467b-8602-280330ecd65c","inbound_rules":[{"ports":"80","protocol":"tcp","sources":{"load_balancer_uids":["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"ports":"22","protocol":"tcp","sources":{"addresses":["18.0.0.0/8"],"tags":["gateway"]}}],"name":"frontend-firewall","outbound_rules":[{"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"]}},"schema":{"properties":{"firewall":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items"}}}}},"description":"The response will be a JSON object with a `firewall` key. This will be set to an object containing the standard firewall attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"firewall\",\"inbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"8080\",\"sources\":{\"load_balancer_uids\": [\"4de7ac8b-495b-4884-9a69-1050c6793cd6\"]}},{\"protocol\": \"tcp\",\"ports\": \"22\",\"sources\":{\"tags\": [\"gateway\"],\"addresses\": [\"18.0.0.0/8\"]}}],\"outbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"8080\",\"destinations\":{\"addresses\":[\"0.0.0.0/0\",\"::/0\"]}}],\"droplet_ids\":[8043964],\"tags\":[\"frontend\"]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.FirewallRequest{\n        Name: 'firewall',\n        InboundRules: []godo.InboundRule{\n            {\n                Protocol: 'tcp',\n                PortRange: '8080',\n                Sources: &godo.Sources{\n                    LoadBalancerUIDs: []string{'4de7ac8b-495b-4884-9a69-1050c6793cd6'},\n                },\n            },\n            {\n                Protocol:  'tcp',\n                PortRange: '22',\n                Sources: &godo.Sources{\n                    Addresses: []string{'18.0.0.0/8'},\n                    Tags: []string{'gateway'},\n                },\n            },\n        },\n        OutboundRules: []godo.OutboundRule{\n            {\n                Protocol: 'tcp',\n                PortRange: '8080',\n                Destinations: &godo.Destinations{\n                    Addresses: []string{'0.0.0.0/0', '::/0'},\n                },\n            },\n        },\n        DropletIDs: []int{8043964},\n        Tags: []string{'frontend'}\n    }\n\n    firewall, req, err := client.Firewalls.Create(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nfirewall = DropletKit::Firewall.new(\n  name: 'firewall',\n  inbound_rules: [\n    DropletKit::FirewallInboundRule.new(\n      protocol: 'tcp',\n      ports: '8080',\n      sources: {\n        load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6']\n      }\n    ),\n    DropletKit::FirewallInboundRule.new(\n      protocol: 'tcp',\n      ports: '22',\n      sources: {\n        tags: ['gateway'],\n        addresses: ['18.0.0.0/8']\n      }\n    )\n  ],\n  outbound_rules: [\n    DropletKit::FirewallOutboundRule.new(\n      protocol: 'tcp',\n      ports: '8080',\n      destinations: {\n        addresses: ['0.0.0.0/0', '::/0'],\n      }\n    )\n  ],\n  droplet_ids: [8043964],\n  tags: ['frontend']\n)\n\nclient.firewalls.update(firewall, id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]}},"/v2/firewalls/{firewall_id}/droplets":{"delete":{"description":"To remove a Droplet from a firewall, send a DELETE request to\n`/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there should\nbe a `droplet_ids` attribute containing a list of Droplet IDs.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_delete_droplets","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"droplet_ids":[49696269]},"schema":{"properties":{"droplet_ids":{"description":"An array containing the IDs of the Droplets to be removed from the firewall.","example":[49696269],"items":{"type":"integer"},"type":"array"}},"required":["droplet_ids"]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Droplets from a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_ids\":[49696269]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/droplets\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Firewalls.RemoveDroplets(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 49696269)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.remove_droplets([49696269], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]},"post":{"description":"To assign a Droplet to a firewall, send a POST request to\n`/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there\nshould be a `droplet_ids` attribute containing a list of Droplet IDs.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_assign_droplets","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"droplet_ids":[49696269]},"schema":{"properties":{"droplet_ids":{"description":"An array containing the IDs of the Droplets to be assigned to the firewall.","example":[49696269],"items":{"type":"integer"},"type":"array"}},"required":["droplet_ids"]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Droplets to a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_ids\":[49696269]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/droplets\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Firewalls.AddDroplets(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 49696269) \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.add_droplets([49696269], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]}},"/v2/firewalls/{firewall_id}/rules":{"delete":{"description":"To remove access rules from a firewall, send a DELETE request to\n`/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an\n`inbound_rules` and/or `outbound_rules` attribute containing an array of rules\nto be removed.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_delete_rules","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"inbound_rules":[{"ports":"3306","protocol":"tcp","sources":{"droplet_ids":[49696269]}}],"outbound_rules":[{"destinations":{"droplet_ids":[49696269]},"ports":"3306","protocol":"tcp"}]},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items/allOf/1"},{"anyOf":[{"required":["inbound_rules"],"title":"Inbound Rules"},{"required":["outbound_rules"],"title":"Outbound Rules"}]}]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Rules from a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"inbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"3306\",\"sources\":{\"droplet_ids\":[49696269]}}],\"outbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"3306\",\"destinations\":{\"droplet_ids\":[49696269]}}]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/rules\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    ruleRequest := &godo.FirewallRulesRequest{\n        InboundRules: []godo.InboundRule{\n            {\n                Protocol:      'tcp',\n                PortRange:     '3306',\n                Sources: &godo.Sources{\n                    DropletIDs: []int{49696269},\n                },\n            },\n        },\n        OutboundRules: []godo.OutboundRule{\n            {\n                Protocol:      'tcp',\n                PortRange:     '3306',\n                Destinations: &godo.Destinations{\n                    DropletIDs: []int{49696269},\n                },\n            },\n        },\n    }\n\n    _, err := c.Firewalls.RemoveRules(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', ruleRequest)\n\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ninbound_rule = DropletKit::FirewallInboundRule.new(\n  protocol: 'tcp',\n  ports: '3306',\n  sources: {\n    droplet_ids: [49696269]\n  }\n)\n\noutbound_rule = DropletKit::FirewallOutboundRule.new(\n  protocol: 'tcp',\n  ports: '3306',\n  destinations: {\n    droplet_ids: [49696269]\n  }\n)\n\nclient.firewalls.remove_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]},"post":{"description":"To add additional access rules to a firewall, send a POST request to\n`/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an\ninbound_rules and/or outbound_rules attribute containing an array of rules to\nbe added.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_add_rules","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"inbound_rules":[{"ports":"3306","protocol":"tcp","sources":{"droplet_ids":[49696269]}}],"outbound_rules":[{"destinations":{"droplet_ids":[49696269]},"ports":"3306","protocol":"tcp"}]},"schema":{"allOf":[{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1firewalls/get/responses/200/content/application~1json/schema/allOf/0/properties/firewalls/items/allOf/1"},{"anyOf":[{"required":["inbound_rules"],"title":"Inbound Rules"},{"required":["outbound_rules"],"title":"Outbound Rules"}]}]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Rules to a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"inbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"3306\",\"sources\":{\"droplet_ids\":[49696269]}}],\"outbound_rules\":[{\"protocol\":\"tcp\",\"ports\":\"3306\",\"destinations\":{\"droplet_ids\":[49696269]}}]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/rules\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\nruleRequest := &godo.FirewallRulesRequest{\n    InboundRules: []godo.InboundRule{\n        {\n            Protocol:      'tcp',\n            PortRange:     '3306',\n            Sources: &godo.Sources{\n                DropletIDs: []int{49696269},\n            },\n        },\n    },\n    OutboundRules: []godo.OutboundRule{\n        {\n            Protocol:      'tcp',\n            PortRange:     '3306',\n            Destinations: &godo.Destinations{\n                DropletIDs: []int{49696269},\n            },\n        },\n    },\n}\n\n_, err := c.Firewalls.AddRules(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', ruleRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ninbound_rule = DropletKit::FirewallInboundRule.new(\n  protocol: 'tcp',\n  ports: '3306',\n  sources: {\n    droplet_ids: [49696269]\n  }\n)\n\noutbound_rule = DropletKit::FirewallOutboundRule.new(\n  protocol: 'tcp',\n  ports: '3306',\n  destinations: {\n    droplet_ids: [49696269]\n  }\n)\n\nclient.firewalls.add_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]}},"/v2/firewalls/{firewall_id}/tags":{"delete":{"description":"To remove a tag representing a group of Droplets from a firewall, send a\nDELETE request to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the\nrequest, there should be a `tags` attribute containing a list of tag names.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_delete_tags","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"tags":["frontend"]},"schema":{"properties":{"tags":{"allOf":[{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"},{"description":"An array containing the names of the Tags to be removed from the firewall."}]}},"required":["tags"]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Tags from a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"tags\":[\"frontend\"]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/tags\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Firewalls.RemoveTags(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 'frontend')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.remove_tags(['frontend'], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]},"post":{"description":"To assign a tag representing a group of Droplets to a firewall, send a POST\nrequest to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the request,\nthere should be a `tags` attribute containing a list of tag names.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"firewalls_add_tags","parameters":[{"$ref":"#/paths/~1v2~1firewalls~1%7Bfirewall_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"tags":["frontend"]},"schema":{"properties":{"tags":{"allOf":[{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"},{"description":"An array containing the names of the Tags to be assigned to the firewall."}]}},"required":["tags"]}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Tags to a Firewall","tags":["Firewalls"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"tags\":[\"frontend\"]}' \\\n  \"https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/tags\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Firewalls.AddTags(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 'frontend') \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.firewalls.add_tags(['frontend'], id: 'bb4b2611-3d72-467b-8602-280330ecd65c')"}]}},"/v2/floating_ips":{"get":{"description":"To list all of the floating IPs available on your account, send a GET request to `/v2/floating_ips`.","operationId":"floatingIPs_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"floating_ips":{"items":{"properties":{"droplet":{"anyOf":[{"description":"If the floating IP is not assigned to a Droplet, the value will be null.","nullable":true,"title":"null","type":"object"},{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"}],"description":"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.","example":null},"ip":{"description":"The public IP address of the floating IP. It also serves as its identifier.","example":"45.55.96.47","format":"ipv4","type":"string"},"locked":{"description":"A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted.","example":true,"type":"boolean"},"project_id":{"description":"The UUID of the project to which the reserved IP currently belongs.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"},"region":{"allOf":[{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"},{"description":"The region that the floating IP is reserved to. When you query a floating IP, the entire region object will be returned.","type":"object"}]}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"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}}}}},"description":"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","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Floating IPs","tags":["Floating IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/floating_ips?page=1&per_page=20\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    floatingIPs, _, err := client.FloatingIPs.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nfloating_ips = client.floating_ips.all\nfloating_ips.each"}]},"post":{"description":"On creation, a floating IP must be either assigned to a Droplet or reserved to a region.\n* To create a new floating IP assigned to a Droplet, send a POST\n  request to `/v2/floating_ips` with the `droplet_id` attribute.\n\n* To create a new floating IP reserved to a region, send a POST request to\n  `/v2/floating_ips` with the `region` attribute.\n\n**Note**:  In addition to the standard rate limiting, only 12 floating IPs may be created per 60 seconds.","operationId":"floatingIPs_create","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"droplet_id":{"description":"The ID of the Droplet that the floating IP will be assigned to.","example":2457247,"type":"integer"}},"required":["droplet_id"],"title":"Assign to Droplet","type":"object"},{"properties":{"project_id":{"description":"The UUID of the project to which the floating IP will be assigned.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"},"region":{"description":"The slug identifier for the region the floating IP will be reserved to.","example":"nyc3","type":"string"}},"required":["region"],"title":"Reserve to Region","type":"object"}]}}},"required":true},"responses":{"202":{"content":{"application/json":{"examples":{"floating_ip_assigning":{"summary":"Assigning to Droplet","value":{"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"}]}}},"floating_ip_reserving":{"summary":"Reserving to Region","value":{"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":{}}}},"schema":{"properties":{"floating_ip":{"$ref":"#/paths/~1v2~1floating_ips/get/responses/200/content/application~1json/schema/allOf/0/properties/floating_ips/items"},"links":{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1droplets/post/responses/202/content/application~1json/schema/oneOf/0/properties/links/properties/actions/items"},"type":"array"},"droplets":{"items":{"$ref":"#/paths/~1v2~1droplets/post/responses/202/content/application~1json/schema/oneOf/0/properties/links/properties/actions/items"},"type":"array"}},"type":"object"}},"type":"object"}}},"description":"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.\nWhen 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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Floating IP","tags":["Floating IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_id\": 123456}' \\\n  \"https://api.digitalocean.com/v2/floating_ips\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.FloatingIPCreateRequest{\n        DropletID: 123456,\n\n    }\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nfloating_ip = DropletKit::FloatingIp.new(droplet_id: 123456)\nclient.floating_ips.create(floating_ip) "}]}},"/v2/floating_ips/{floating_ip}":{"delete":{"description":"To delete a floating IP and remove it from your account, send a DELETE request\nto `/v2/floating_ips/$FLOATING_IP_ADDR`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"floatingIPs_delete","parameters":[{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Floating IP","tags":["Floating IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.FloatingIPs.Delete(ctx, \"45.55.96.34\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.floating_ips.delete(ip: '45.55.96.47') "}]},"get":{"description":"To show information about a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP_ADDR`.","operationId":"floatingIPs_get","parameters":[{"description":"A floating IP address.","example":"45.55.96.47","in":"path","name":"floating_ip","required":true,"schema":{"format":"ipv4","minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"floating_ip_assigned":{"summary":"Assigned to Droplet","value":{"floating_ip":{"droplet":{"backup_ids":[53893572],"created_at":"2025-08-15T13:52:28.135Z","disk":25,"features":["backups","private_networking","ipv6"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.135Z","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":"2025-08-15T13:52:28.135Z","start":"2025-08-15T13:52:28.135Z"},"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"}}}},"floating_ip_reserved":{"summary":"Reserved to Region","value":{"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"}}}}},"schema":{"properties":{"floating_ip":{"$ref":"#/paths/~1v2~1floating_ips/get/responses/200/content/application~1json/schema/allOf/0/properties/floating_ips/items"}},"type":"object"}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Floating IP","tags":["Floating IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    floatingIP, _, err := client.FloatingIPs.Get(ctx, \"45.55.96.47\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.floating_ips.find(ip: '45.55.96.47')"}]}},"/v2/floating_ips/{floating_ip}/actions":{"get":{"description":"To retrieve all actions that have been executed on a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions`.","operationId":"floatingIPsAction_list","parameters":[{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"actions":[{"completed_at":"2025-08-15T13:52:28.135Z","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":"2025-08-15T13:52:28.135Z","status":"completed","type":"reserve_ip"}],"links":{},"meta":{"total":1}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Actions for a Floating IP","tags":["Floating IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    actions, _, err := client.FloatingIPActions.List(ctx, '45.55.96.47', opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nactions = client.floating_ip_actions.all(ip: '45.55.96.47')\nactions.each"}]},"post":{"description":"To initiate an action on a floating IP send a POST request to\n`/v2/floating_ips/$FLOATING_IP/actions`. In the JSON body to the request,\nset the `type` attribute to on of the supported action types:\n\n| Action     | Details\n|------------|--------\n| `assign`   | Assigns a floating IP to a Droplet\n| `unassign` | Unassign a floating IP from a Droplet\n","operationId":"floatingIPsAction_post","parameters":[{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"discriminator":{"mapping":{"assign":"#/floating_ip_action_assign","unassign":"#/floating_ip_action_unassign"},"propertyName":"type"},"properties":{"type":{"description":"The type of action to initiate for the floating IP.","enum":["assign","unassign"],"type":"string"}},"required":["type"],"type":"object"},{"required":["type"],"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0/allOf/0"},{"properties":{"droplet_id":{"description":"The ID of the Droplet that the floating IP will be assigned to.","example":758604968,"type":"integer"}},"required":["type","droplet_id"],"type":"object"}]}],"discriminator":{"mapping":{"assign":"models/floating_ip_actions.yml#/floating_ip_action_assign","unassign":"models/floating_ip_actions.yml#/floating_ip_action_unassign"},"propertyName":"type"}}}},"description":"The `type` attribute set in the request body will specify the action that\nwill be taken on the floating IP.\n"},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"action":{"completed_at":"2025-08-15T13:52:28.135Z","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":"2025-08-15T13:52:28.135Z","status":"completed","type":"assign_ip"}},"properties":{"action":{"allOf":[{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},{"properties":{"project_id":{"description":"The UUID of the project to which the reserved IP currently belongs.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"}},"type":"object"}]}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate a Floating IP Action","tags":["Floating IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Assign a Floating IP to a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"assign\",\"droplet_id\":8219222}' \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions\"\n\n# Unassign a Floating IP\n# curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"unassign\"}' \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n  // Assign a Floating IP to a Droplet\n    action, _, err := client.FloatingIPActions.Assign(ctx, \"45.55.96.47\", 8219222)\n\n  // Unassign a Floating IP\n  // action, _, err := client.FloatingIPActions.Unassign(ctx, \"45.55.96.47\")  \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Assign a Floating IP to a Droplet\nclient.floating_ip_actions.assign(ip: '45.55.96.47', droplet_id: 8219222)\n\n# Unassign a Floating IP\n# client.floating_ip_actions.unassign(ip: '45.55.96.47')"}]}},"/v2/floating_ips/{floating_ip}/actions/{action_id}":{"get":{"description":"To retrieve the status of a floating IP action, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions/$ACTION_ID`.","operationId":"floatingIPsAction_get","parameters":[{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/parameters/0"}],"responses":{"200":{"$ref":"#/paths/~1v2~1floating_ips~1%7Bfloating_ip%7D~1actions/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Floating IP Action","tags":["Floating IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions/72531856\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.FloatingIPActions.Get(ctx, \"45.55.96.47\", 72531856)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.floating_ip_actions.find(ip: '45.55.96.47', id: 72531856)"}]}},"/v2/functions/namespaces":{"get":{"description":"Returns a list of namespaces associated with the current user. To get all namespaces, send a GET request to `/v2/functions/namespaces`.","operationId":"functions_list_namespaces","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"namespaces":{"items":{"properties":{"api_host":{"description":"The namespace's API hostname. Each function in a namespace is provided an endpoint at the namespace's hostname.","example":"https://api_host.io","type":"string"},"created_at":{"description":"UTC time string.","example":"2025-08-15T13:52:28.135Z","type":"string"},"key":{"description":"A random alpha numeric string. This key is used in conjunction with the namespace's UUID to authenticate \na user to use the namespace via `doctl`, DigitalOcean's official CLI.","example":"d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2","type":"string"},"label":{"description":"The namespace's unique name.","example":"my namespace","type":"string"},"namespace":{"description":"A unique string format of UUID with a prefix fn-.","example":"fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"string"},"region":{"description":"The namespace's datacenter region.","example":"nyc1","type":"string"},"updated_at":{"description":"UTC time string.","example":"2025-08-15T13:52:28.135Z","type":"string"},"uuid":{"description":"The namespace's Universally Unique Identifier.","example":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}]}}},"description":"An array of JSON objects with a key called `namespaces`.  Each object represents a namespace and contains\nthe properties associated with it. ","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Namespaces","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces\""}]},"post":{"description":"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.","operationId":"functions_create_namespace","requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"description":"The namespace's unique name.","example":"my namespace","type":"string"},"region":{"description":"The [datacenter region](https://docs.digitalocean.com/products/platform/availability-matrix/#available-datacenters) in which to create the namespace.","example":"nyc1","type":"string"}},"required":["region","label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"namespace":{"$ref":"#/paths/~1v2~1functions~1namespaces/get/responses/200/content/application~1json/schema/allOf/0/properties/namespaces/items"}},"type":"object"}}},"description":"A JSON response object with a key called `namespace`. The object contains the properties associated\nwith the namespace.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"content":{"application/json":{"example":{"id":"bad_request","message":"Invalid request payload: missing label field","request_id":"4851a473-1621-42ea-b2f9-5071c0ea8414"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Bad Request.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"422":{"content":{"application/json":{"example":{"id":"unprocessable_entity","message":"namespace limit reached","request_id":"a3275238-3d04-4405-a123-55c389b406c0"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Limit Reached","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create Namespace","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"region\": \"nyc1\", \"label\": \"my namespace label\"}' \\\n  \"https://api.digitalocean.com/v2/functions/namespaces\""}]}},"/v2/functions/namespaces/{namespace_id}":{"delete":{"description":"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.\nTo delete namespace, send a DELETE request to `/v2/functions/namespaces/$NAMESPACE_ID`.\nA successful deletion returns a 204 response.","operationId":"functions_delete_namespace","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete Namespace","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}\""}]},"get":{"description":"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.","operationId":"functions_get_namespace","parameters":[{"description":"The ID of the namespace to be managed.","example":"fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","in":"path","name":"namespace_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1functions~1namespaces/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"403":{"content":{"application/json":{"example":{"id":"forbidden","message":"not allowed to get namespace","request_id":"b11e45a4-892c-48c9-9001-b6cffe9fe795"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Not Allowed.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"404":{"content":{"application/json":{"example":{"id":"not_found","message":"namespace not found","request_id":"88d17b7a-630b-4083-99ce-5b91045efdb4"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Bad Request.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Namespace","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}\""}]}},"/v2/functions/namespaces/{namespace_id}/triggers":{"get":{"description":"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`.","operationId":"functions_list_triggers","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"triggers":{"items":{"properties":{"created_at":{"description":"UTC time string.","example":"2025-08-15T13:52:28.136Z","type":"string"},"function":{"description":"Name of function(action) that exists in the given namespace.","example":"hello","type":"string"},"is_enabled":{"description":"Indicates weather the trigger is paused or unpaused.","example":true,"type":"boolean"},"name":{"description":"The trigger's unique name within the namespace.","example":"my trigger","type":"string"},"namespace":{"description":"A unique string format of UUID with a prefix fn-.","example":"fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"string"},"scheduled_details":{"description":"Trigger details for SCHEDULED type, where body is optional.\n","properties":{"body":{"description":"Optional data to be sent to function while triggering the function.","nullable":true,"properties":{"name":{"example":"Welcome to DO!","type":"string"}},"type":"object"},"cron":{"description":"valid cron expression string which is required for SCHEDULED type triggers.","example":"* * * * *","type":"string"}},"required":["cron"],"type":"object"},"scheduled_runs":{"properties":{"last_run_at":{"description":"Indicates last run time. null value indicates trigger not run yet.","example":"2025-08-15T13:52:28.136Z","nullable":true,"type":"string"},"next_run_at":{"description":"Indicates next run time. null value indicates trigger will not run.","example":"2025-08-15T13:52:28.136Z","nullable":true,"type":"string"}},"type":"object"},"type":{"description":"String which indicates the type of trigger source like SCHEDULED.","example":"SCHEDULED","type":"string"},"updated_at":{"description":"UTC time string.","example":"2025-08-15T13:52:28.136Z","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}]}}},"description":"An array of JSON objects with a key called `namespaces`.  Each object represents a namespace and contains\nthe properties associated with it. ","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Triggers","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers\""}]},"post":{"description":"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.","operationId":"functions_create_trigger","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"function":{"description":"Name of function(action) that exists in the given namespace.","example":"hello","type":"string"},"is_enabled":{"description":"Indicates weather the trigger is paused or unpaused.","example":true,"type":"boolean"},"name":{"description":"The trigger's unique name within the namespace.","example":"my trigger","type":"string"},"scheduled_details":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/get/responses/200/content/application~1json/schema/allOf/0/properties/triggers/items/properties/scheduled_details"},"type":{"description":"One of different type of triggers. Currently only SCHEDULED is supported.","example":"SCHEDULED","type":"string"}},"required":["name","function","type","is_enabled","scheduled_details"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"trigger":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/get/responses/200/content/application~1json/schema/allOf/0/properties/triggers/items"}},"type":"object"}}},"description":"A JSON response object with a key called `trigger`. The object contains the properties associated\nwith the trigger.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Bad Request.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/responses/404"},"422":{"content":{"application/json":{"example":{"id":"unprocessable_entity","message":"triggers limit reached","request_id":"7ba99a43-6618-4fe0-9af7-092752ad0d56"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Limit Reached","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create Trigger","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"my trigger\", \"function\": \"hello\", \"type\": \"SCHEDULED\", \"is_enabled\": true, \"scheduled_details\": {\"cron\": \"* * * * *\", \"body\": {\"name\": \"Welcome to DO!\"}}}' \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers\""}]}},"/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}":{"delete":{"description":"Deletes the given trigger.\nTo delete trigger, send a DELETE request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME`.\nA successful deletion returns a 204 response.","operationId":"functions_delete_trigger","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers~1%7Btrigger_name%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers~1%7Btrigger_name%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete Trigger","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}\""}]},"get":{"description":"Gets the trigger details. To get the trigger details, send a GET request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME`.","operationId":"functions_get_trigger","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"},{"description":"The name of the trigger to be managed.","example":"my trigger","in":"path","name":"trigger_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"content":{"application/json":{"examples":{"namespace not found":{"value":{"id":"not_found","message":"namespace not found","request_id":"88d17b7a-630b-4083-99ce-5b91045efdb4"}},"trigger not found":{"value":{"id":"not_found","message":"trigger not found","request_id":"88d17b7a-630b-4083-99ce-5b91045efdb4"}}},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Bad Request.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Trigger","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}\""}]},"put":{"description":"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.","operationId":"functions_update_trigger","parameters":[{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers~1%7Btrigger_name%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"is_enabled":{"description":"Indicates weather the trigger is paused or unpaused.","example":true,"type":"boolean"},"scheduled_details":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/get/responses/200/content/application~1json/schema/allOf/0/properties/triggers/items/properties/scheduled_details"}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/post/responses/200"},"400":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1functions~1namespaces~1%7Bnamespace_id%7D~1triggers~1%7Btrigger_name%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update Trigger","tags":["Functions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"is_enabled\": true, \"scheduled_details\": {\"cron\": \"* * * * *\", \"body\": {\"name\": \"Welcome to DO!\"}}}' \\\n  \"https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}\""}]}},"/v2/images":{"get":{"description":"To list all of the images available on your account, send a GET request to /v2/images.\n\n## Filtering Results\n-----\n\nIt's possible to request filtered results by including certain query parameters.\n\n**Image Type**\n\nEither 1-Click Application or OS Distribution images can be filtered by using the `type` query parameter.\n\n> Important: The `type` query parameter does not directly relate to the `type` attribute.\n\nTo retrieve only ***distribution*** images, include the `type` query parameter set to distribution, `/v2/images?type=distribution`.\n\nTo retrieve only ***application*** images, include the `type` query parameter set to application, `/v2/images?type=application`.\n\n**User Images**\n\nTo retrieve only the private images of a user, include the `private` query parameter set to true, `/v2/images?private=true`.\n\n**Tags**\n\nTo list all images 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/images?tag_name=$TAG_NAME`.\n","operationId":"images_list","parameters":[{"description":"Filters results based on image type which can be either `application` or `distribution`.","example":"distribution","in":"query","name":"type","required":false,"schema":{"enum":["application","distribution"],"type":"string"}},{"description":"Used to filter only user images.","example":true,"in":"query","name":"private","required":false,"schema":{"type":"boolean"}},{"description":"Used to filter images by a specific tag.","example":"base-image","in":"query","name":"tag_name","required":false,"schema":{"type":"string"}},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"All":{"value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":7555620,"min_disk_size":20,"name":"Nifty New Snapshot","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":7555621,"min_disk_size":20,"name":"Another Snapshot","public":false,"regions":["nyc2"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":63663980,"min_disk_size":20,"name":"20.04 (LTS) x64","public":true,"regions":["nyc2","nyc3"],"size_gigabytes":2.36,"slug":"ubuntu-20-04-x64","status":"available","tags":[],"type":"snapshot"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Arch Linux","error_message":"","id":7555621,"min_disk_size":20,"name":"A custom image","public":false,"regions":["nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"custom"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Fedora","error_message":"","id":7555621,"min_disk_size":20,"name":"An APP image","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"CentOS","error_message":"","id":7555621,"min_disk_size":20,"name":"A simple tagged image","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":["simple-image"],"type":"snapshot"}],"links":{"pages":{}},"meta":{"total":6}}},"Application":{"description":"**Important:**  \nThe `type` query parameter is not directly related to the `type` attribute.\n","value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Fedora","error_message":"","id":7555621,"min_disk_size":20,"name":"An APP image","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"}],"links":{"pages":{}},"meta":{"total":1}}},"Custom":{"value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Arch Linux","error_message":"","id":7555621,"min_disk_size":20,"name":"A custom image","public":false,"regions":["nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"custom"}],"links":{"pages":{}},"meta":{"total":1}}},"Distribution":{"description":"**Important:**  \nThe `type` query parameter is not directly related to the `type` attribute.\nThe main thing to remember here is that DigitalOcean-produced distribution images will have `snapshot` as the type attribute. \n","value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":63663980,"min_disk_size":20,"name":"20.04 (LTS) x64","public":true,"regions":["nyc2","nyc3"],"size_gigabytes":2.36,"slug":"ubuntu-20-04-x64","status":"available","tags":[],"type":"snapshot"}],"links":{"pages":{}},"meta":{"total":1}}},"Snapshots":{"value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":7555620,"min_disk_size":20,"name":"Nifty New Snapshot","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"},{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":7555621,"min_disk_size":20,"name":"Another Snapshot","public":false,"regions":["nyc2"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[],"type":"snapshot"}],"links":{"pages":{}},"meta":{"total":2}}},"Tagged":{"value":{"images":[{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"CentOS","error_message":"","id":7555621,"min_disk_size":20,"name":"A simple tagged image","public":false,"regions":["nyc2","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":["simple-image"],"type":"snapshot"}],"links":{"pages":{}},"meta":{"total":1}}}},"schema":{"allOf":[{"properties":{"images":{"items":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image"},"type":"array"}},"required":["images"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"The response will be a JSON object with a key called `images`.  This will be set to an array of image objects, each of which will contain the standard image attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Images","tags":["Images"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    // List all images\n    images, _, err := client.Images.List(ctx, opt)\n\n    // List all application images\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    images, _, err := client.Images.ListApplication(ctx, opt) \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# List all images\nimages = client.images.all\nimages.each\n\n# List all application images\nimages = client.images.all(type: 'application')\nimages.each"}]},"post":{"description":"To create a new custom image, send a POST request to /v2/images.\nThe body must contain a url attribute pointing to a Linux virtual machine\nimage to be imported into DigitalOcean.\nThe image must be in the raw, qcow2, vhdx, vdi, or vmdk format.\nIt may be compressed using gzip or bzip2 and must be smaller than 100 GB after\n being decompressed.\n","operationId":"images_create_custom","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"description":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/description"},"distribution":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/distribution"},"name":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/name"}},"type":"object"},{"properties":{"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"},"tags":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"},"url":{"description":"A URL from which the custom Linux virtual machine image may be retrieved.  The image it points to must be in the raw, qcow2, vhdx, vdi, or vmdk format.  It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.","example":"http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img","type":"string"}}}],"example":{"description":"Cloud-optimized image w/ small footprint","distribution":"Ubuntu","name":"ubuntu-18.04-minimal","region":"nyc3","tags":["base-image","prod"],"url":"http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img"},"required":["name","url","region"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"image":{"created_at":"2025-08-15T13:52:28.136Z","description":"Cloud-optimized image w/ small footprint","distribution":"Ubuntu","error_message":"","id":38413969,"name":"ubuntu-18.04-minimal","regions":[],"status":"NEW","tags":["base-image","prod"],"type":"custom"}},"schema":{"properties":{"image":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image"}}}}},"description":"The response will be a JSON object with a key set to `image`.  The value of this will be an image object containing a subset of the standard  image attributes as listed below, including the image's `id` and `status`.  After initial creation, the `status` will be `NEW`. Using the image's id, you  may query the image's status by sending a `GET` request to the  `/v2/images/$IMAGE_ID` endpoint.  When the `status` changes to `available`, the image will be ready for use.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a Custom Image","tags":["Images"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"ubuntu-18.04-minimal\", \"url\": \"http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img\", \"distribution\": \"Ubuntu\", \"region\": \"nyc3\", \"description\": \"Cloud-optimized image w/ small footprint\", \"tags\":[\"base-image\", \"prod\"]}' \\\n  \"https://api.digitalocean.com/v2/images\""}]}},"/v2/images/{image_id}":{"delete":{"description":"To delete a snapshot or custom image, send a `DELETE` request to `/v2/images/$IMAGE_ID`.\n","operationId":"images_delete","parameters":[{"$ref":"#/paths/~1v2~1images~1%7Bimage_id%7D/put/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an Image","tags":["Images"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images/7938391\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Images.Delete(ctx, 7938391)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.images.delete(id: 7938391)"}]},"get":{"description":"To retrieve information about an image, send a `GET` request to\n`/v2/images/$IDENTIFIER`.\n","operationId":"images_get","parameters":[{"description":"A unique number (id) or string (slug) used to identify and reference a\nspecific image.\n\n**Public** images can be identified by image `id` or `slug`.\n\n**Private** images *must* be identified by image `id`.\n","examples":{"byId":{"summary":"Retrieve a public or private image by id","value":62137902},"bySlug":{"summary":"Retrieve a public image by slug","value":"ubuntu-16-04-x64"}},"in":"path","name":"image_id","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}]}}],"responses":{"200":{"content":{"application/json":{"example":{"image":{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":6918990,"min_disk_size":20,"name":"14.04 x64","public":true,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","ams3","nyc3"],"size_gigabytes":2.34,"slug":"ubuntu-16-04-x64","status":"available","tags":[]}},"schema":{"properties":{"image":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image"}},"required":["image"],"type":"object"}}},"description":"The response will be a JSON object with a key called `image`.  The value of this will be an image object containing the standard image attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Image","tags":["Images"],"x-codeSamples":[{"lang":"cURL","source":"# Get existing image by ID\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images/7555620\"\n\n# Get existing image by slug\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images/ubuntu-16-04-x64\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    // Get existing image by ID\n    image, _, err := client.Images.GetByID(ctx, 7555620)\n\n    // Get existing image by slug\n    // image, _, err := client.Images.GetBySlug(ctx, \"ubuntu-16-04-x64\") \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Retrieve image by ID\nclient.images.find(id: '7555620')\n\n# Retrieve image by slug\nclient.images.find(id: 'ubuntu-16-04-x64')"}]},"put":{"description":"To update an image, send a `PUT` request to `/v2/images/$IMAGE_ID`.\nSet the `name` attribute to the new value you would like to use.\nFor custom images, the `description` and `distribution` attributes may also be updated.\n","operationId":"images_update","parameters":[{"description":"A unique number that can be used to identify and reference a specific image.","example":62137902,"in":"path","name":"image_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1images/post/requestBody/content/application~1json/schema/allOf/0"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"image":{"created_at":"2025-08-15T13:52:28.136Z","description":"","distribution":"Ubuntu","error_message":"","id":7938391,"min_disk_size":20,"name":"new-image-name","public":false,"regions":["nyc3","nyc3"],"size_gigabytes":2.34,"slug":null,"status":"available","tags":[]}},"schema":{"properties":{"image":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image"}},"required":["image"],"type":"object"}}},"description":"The response will be a JSON object with a key set to `image`.  The value of this will be an image object containing the standard image attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update an Image","tags":["Images"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"new-image-name\"}' \\\n  \"https://api.digitalocean.com/v2/images/7938391\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.ImageUpdateRequest{\n        Name: \"new-image-name\",\n    }\n\n    image, _, err := client.Images.Update(ctx, id, updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nimage = DropletKit::Image.new(name: 'new-image-name')\nclient.images.update(image, id: 7938391)"}]}},"/v2/images/{image_id}/actions":{"get":{"description":"To retrieve all actions that have been executed on an image, send a GET request to `/v2/images/$IMAGE_ID/actions`.","operationId":"imageActions_list","parameters":[{"$ref":"#/paths/~1v2~1images~1%7Bimage_id%7D/put/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"actions":[{"completed_at":"2025-08-15T13:52:28.136Z","id":29410565,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","server_id","install_agent","storage","image_transfer"],"name":"New York 2","sizes":["s-1vcpu-3gb","m-1vcpu-8gb","s-3vcpu-1gb","s-1vcpu-2gb","s-2vcpu-2gb","s-2vcpu-4gb","s-4vcpu-8gb","s-6vcpu-16gb","s-8vcpu-32gb","s-12vcpu-48gb","s-16vcpu-64gb","s-20vcpu-96gb","s-1vcpu-1gb","c-1vcpu-2gb","s-24vcpu-128gb"],"slug":"nyc2"},"region_slug":"nyc2","resource_id":7555620,"resource_type":"image","started_at":"2025-08-15T13:52:28.136Z","status":"completed","type":"transfer"}],"links":{"pages":{"last":"https://api.digitalocean.com/v2/images/7555620/actions?page=5&per_page=1","next":"https://api.digitalocean.com/v2/images/7555620/actions?page=2&per_page=1"}},"meta":{"total":5}},"schema":{"allOf":[{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Actions for an Image","tags":["Image Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images/7555620/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    \n}"}]},"post":{"description":"The following actions are available on an Image.\n\n## Convert an Image to a Snapshot\n\nTo convert an image, for example, a backup to a snapshot, send a POST request\nto `/v2/images/$IMAGE_ID/actions`. Set the `type` attribute to `convert`.\n\n## Transfer an Image\n\nTo transfer an image to another region, send a POST request to\n`/v2/images/$IMAGE_ID/actions`. Set the `type` attribute to `transfer` and set\n`region` attribute to the slug identifier of the region you wish to transfer\nto.\n","operationId":"imageActions_post","parameters":[{"$ref":"#/paths/~1v2~1images~1%7Bimage_id%7D/put/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"type":{"description":"The action to be taken on the image. Can be either `convert` or `transfer`.","enum":["convert","transfer"],"example":"convert","type":"string"}},"required":["type"],"type":"object"},{"allOf":[{"$ref":"#/paths/~1v2~1images~1%7Bimage_id%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"properties":{"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},"required":["type","region"],"type":"object"}]}],"discriminator":{"mapping":{"convert":"models/image_action.yml#/image_action_base","transfer":"models/image_action.yml#/image_action_transfer"},"propertyName":"type"}}}}},"responses":{"201":{"content":{"application/json":{"example":{"action":{"completed_at":null,"id":36805527,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","server_id","install_agent","storage","image_transfer"],"name":"New York 3","sizes":["s-1vcpu-3gb","m-1vcpu-8gb","s-3vcpu-1gb","s-1vcpu-2gb","s-2vcpu-2gb","s-2vcpu-4gb","s-4vcpu-8gb","s-6vcpu-16gb","s-8vcpu-32gb","s-12vcpu-48gb","s-16vcpu-64gb","s-20vcpu-96gb","s-1vcpu-1gb","c-1vcpu-2gb","s-24vcpu-128gb"],"slug":"nyc3"},"region_slug":"nyc3","resource_id":7938269,"resource_type":"image","started_at":"2025-08-15T13:52:28.136Z","status":"in-progress","type":"transfer"}},"schema":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"}}},"description":"The response will be a JSON object with a key called `action`. The value of this will be an object containing the standard image action attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate an Image Action","tags":["Image Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Transfer an Existing Image\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"transfer\",\"region\":\"nyc2\"}' \\\n  \"https://api.digitalocean.com/v2/images/7938269/actions\"\n\n# Convert an Image into a Snapshot\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"convert\"}' \\\n  \"https://api.digitalocean.com/v2/images/7938291/actions\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    // Transfer an existing image\n    transferRequest := &godo.ActionRequest{\n        \"type\":   \"transfer\",\n        \"region\": \"nyc2\",\n    }\n  # Transfer an Image\n    transfer, _, err := client.ImageActions.Transfer(ctx, 7938269, transferRequest)\n\n  # Convert an Image to a Snapshot\n  # client.image_actions.convert(image_id: 7938269)\n\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Transfer an Image\nclient.image_actions.transfer(image_id: 7938269, region: 'nyc2')\n\n# Convert an Image to a Snapshot\n# client.image_actions.convert(image_id: 7938269)"}]}},"/v2/images/{image_id}/actions/{action_id}":{"get":{"description":"To retrieve the status of an image action, send a GET request to `/v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID`.","operationId":"imageActions_get","parameters":[{"$ref":"#/paths/~1v2~1images~1%7Bimage_id%7D/put/parameters/0"},{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"action":{"completed_at":null,"id":36805527,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","server_id","install_agent","storage","image_transfer"],"name":"New York 3","sizes":["s-1vcpu-3gb","m-1vcpu-8gb","s-3vcpu-1gb","s-1vcpu-2gb","s-2vcpu-2gb","s-2vcpu-4gb","s-4vcpu-8gb","s-6vcpu-16gb","s-8vcpu-32gb","s-12vcpu-48gb","s-16vcpu-64gb","s-20vcpu-96gb","s-1vcpu-1gb","c-1vcpu-2gb","s-24vcpu-128gb"],"slug":"nyc3"},"region_slug":"nyc3","resource_id":7938269,"resource_type":"image","started_at":"2025-08-15T13:52:28.137Z","status":"in-progress","type":"transfer"}},"schema":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"}}},"description":"The response will be an object with a key called `action`. The value of this will be an object that contains the standard image action attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Action","tags":["Image Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/images/7938269/actions/36805527\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.ImageActions.Get(ctx, 7938269, 36805527)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.image_actions.find(image_id: 7938269, id: 36805527)"}]}},"/v2/kubernetes/clusters":{"get":{"description":"To list all of the Kubernetes clusters on your account, send a GET request\nto `/v2/kubernetes/clusters`.\n","operationId":"kubernetes_list_clusters","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"All Kubernetes Clusters":{"value":{"kubernetes_clusters":[{"auto_upgrade":false,"cluster_subnet":"10.244.0.0/16","created_at":"2025-08-15T13:52:28.137Z","endpoint":"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com","ha":false,"id":"bd5f5959-5e1e-4205-a714-a914373942af","ipv4":"68.183.121.157","maintenance_policy":{"day":"any","duration":"4h0m0s","start_time":"00:00"},"name":"prod-cluster-01","node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]},{"auto_scale":true,"count":2,"id":"f49f4379-7e7f-4af5-aeb6-0354bd840778","labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545373","id":"3385619f-8ec3-42ba-bb23-8d21b8ba7518","name":"affectionate-nightingale-3nif","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545374","id":"4b8f60ff-ba06-4523-a6a4-b8148244c7e6","name":"affectionate-nightingale-3niy","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"g-4vcpu-16gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}],"region":"nyc1","registry_enabled":false,"service_subnet":"10.245.0.0/16","status":{"message":"provisioning","state":"provisioning"},"surge_upgrade":false,"tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af"],"updated_at":"2025-08-15T13:52:28.137Z","version":"1.18.6-do.0","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}],"meta":{"total":1}}}},"schema":{"allOf":[{"properties":{"kubernetes_clusters":{"items":{"properties":{"auto_upgrade":{"default":false,"description":"A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.","example":true,"type":"boolean"},"cluster_subnet":{"description":"The range of IP addresses in the overlay network of the Kubernetes cluster in CIDR notation.","example":"10.244.0.0/16","format":"cidr","readOnly":true,"type":"string"},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created.","example":"2025-08-15T13:52:28.137Z","format":"date-time","readOnly":true,"type":"string"},"endpoint":{"description":"The base URL of the API server on the Kubernetes master node.","example":"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com","readOnly":true,"type":"string"},"ha":{"default":false,"description":"A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled.","example":true,"type":"boolean"},"id":{"description":"A unique ID that can be used to identify and reference a Kubernetes cluster.","example":"bd5f5959-5e1e-4205-a714-a914373942af","format":"uuid","readOnly":true,"type":"string"},"ipv4":{"description":"The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+)","example":"68.183.121.157","readOnly":true,"type":"string"},"maintenance_policy":{"description":"An object specifying the maintenance window policy for the Kubernetes cluster.","nullable":true,"properties":{"day":{"description":"The day of the maintenance window policy. May be one of `monday` through `sunday`, or `any` to indicate an arbitrary week day.","enum":["any","monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"example":"any","type":"string"},"duration":{"description":"The duration of the maintenance window policy in human-readable format.","example":"4h0m0s","readOnly":true,"type":"string"},"start_time":{"description":"The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., `15:00`).","example":720,"type":"string"}},"type":"object"},"name":{"description":"A human-readable name for a Kubernetes cluster.","example":"prod-cluster-01","type":"string"},"node_pools":{"description":"An object specifying the details of the worker nodes available to the Kubernetes cluster.","items":{"allOf":[{"properties":{"size":{"description":"The slug identifier for the type of Droplet used as workers in the node pool.","example":"s-1vcpu-2gb","type":"string"}},"type":"object"},{"properties":{"auto_scale":{"description":"A boolean value indicating whether auto-scaling is enabled for this node pool.","example":true,"type":"boolean"},"count":{"description":"The number of Droplet instances in the node pool.","example":3,"type":"integer"},"id":{"description":"A unique ID that can be used to identify and reference a specific node pool.","example":"cdda885e-7663-40c8-bc74-3a036c66545d","format":"uuid","readOnly":true,"type":"string"},"labels":{"description":"An object containing a set of Kubernetes labels. The keys and are values are both user-defined.","example":null,"nullable":true,"type":"object"},"max_nodes":{"description":"The maximum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`.","example":6,"type":"integer"},"min_nodes":{"description":"The minimum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`.","example":3,"type":"integer"},"name":{"description":"A human-readable name for the node pool.","example":"frontend-pool","type":"string"},"nodes":{"description":"An object specifying the details of a specific worker node in a node pool.","items":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the node was created.","example":"2025-08-15T13:52:28.137Z","format":"date-time","type":"string"},"droplet_id":{"description":"The ID of the Droplet used for the worker node.","example":"205545370","type":"string"},"id":{"description":"A unique ID that can be used to identify and reference the node.","example":"e78247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","format":"uuid","type":"string"},"name":{"description":"An automatically generated, human-readable name for the node.","example":"adoring-newton-3niq","type":"string"},"status":{"description":"An object containing a `state` attribute whose value is set to a string indicating the current status of the node.","properties":{"state":{"description":"A string indicating the current status of the node.","enum":["provisioning","running","draining","deleting"],"example":"provisioning","type":"string"}},"type":"object"},"updated_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the node was last updated.","example":"2025-08-15T13:52:28.137Z","format":"date-time","type":"string"}},"type":"object"},"readOnly":true,"type":"array"},"tags":{"description":"An array containing the tags applied to the node pool. All node pools are automatically tagged `k8s`, `k8s-worker`, and `k8s:$K8S_CLUSTER_ID`.","example":["k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s-worker","production","web-team"],"items":{"type":"string"},"type":"array"},"taints":{"description":"An array of taints to apply to all nodes in a pool. Taints will automatically be applied to all existing nodes and any subsequent nodes added to the pool. When a taint is removed, it is removed from all nodes in the pool.","items":{"properties":{"effect":{"description":"How the node reacts to pods that it won't tolerate. Available effect values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`.","enum":["NoSchedule","PreferNoSchedule","NoExecute"],"example":"NoSchedule","type":"string"},"key":{"description":"An arbitrary string. The `key` and `value` fields of the `taint` object form a key-value pair. For example, if the value of the `key` field is \"special\" and the value of the `value` field is \"gpu\", the key value pair would be `special=gpu`.","example":"priority","type":"string"},"value":{"description":"An arbitrary string. The `key` and `value` fields of the `taint` object form a key-value pair. For example, if the value of the `key` field is \"special\" and the value of the `value` field is \"gpu\", the key value pair would be `special=gpu`.","example":"high","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}],"required":["name","size","count"],"type":"object"},"type":"array"},"region":{"description":"The slug identifier for the region where the Kubernetes cluster is located.","example":"nyc1","type":"string"},"registry_enabled":{"description":"A read-only boolean value indicating if a container registry is integrated with the cluster.","example":true,"readOnly":true,"type":"boolean"},"service_subnet":{"description":"The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation.","example":"10.245.0.0/16","readOnly":true,"type":"string"},"status":{"description":"An object containing a `state` attribute whose value is set to a string indicating the current status of the cluster.","properties":{"message":{"description":"An optional message providing additional information about the current cluster state.","example":"provisioning","type":"string"},"state":{"description":"A string indicating the current status of the cluster.","enum":["running","provisioning","degraded","error","deleted","upgrading","deleting"],"example":"provisioning","type":"string"}},"readOnly":true,"type":"object"},"surge_upgrade":{"default":false,"description":"A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes.","example":true,"type":"boolean"},"tags":{"description":"An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`.","example":["k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","production","web-team"],"items":{"type":"string"},"type":"array"},"updated_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated.","example":"2025-08-15T13:52:28.137Z","format":"date-time","readOnly":true,"type":"string"},"version":{"description":"The slug identifier for the version of Kubernetes used for the cluster. If set to a minor version (e.g. \"1.14\"), the latest version within it will be used (e.g. \"1.14.6-do.1\"); if set to \"latest\", the latest published version will be used. See the `/v2/kubernetes/options` endpoint to find all currently available versions.","example":"1.18.6-do.0","type":"string"},"vpc_uuid":{"description":"A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.","example":"c33931f2-a26a-4e61-b85c-4e95a2ec431b","format":"uuid","type":"string"}},"required":["name","region","version","node_pools"],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"The response will be a JSON object with a key called `kubernetes_clusters`.\nThis will be set to an array of objects, each of which will contain the\nstandard Kubernetes cluster attributes.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Kubernetes Clusters","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    clusters, _, err := client.Kubernetes.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclusters = client.kubernetes_clusters.all\nclusters.each"}]},"post":{"description":"To create a new Kubernetes cluster, send a POST request to\n`/v2/kubernetes/clusters`. The request must contain at least one node pool\nwith at least one worker.\n\nThe request may contain a maintenance window policy describing a time period\nwhen disruptive maintenance tasks may be carried out. Omitting the policy\nimplies that a window will be chosen automatically. See\n[here](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/)\nfor details.\n","operationId":"kubernetes_create_cluster","requestBody":{"content":{"application/json":{"examples":{"Kubernetes Cluster Request":{"value":{"name":"prod-cluster-01","node_pools":[{"count":3,"name":"worker-pool","size":"s-1vcpu-2gb"}],"region":"nyc1","version":"1.18.6-do.0"}},"Kubernetes Cluster with Multiple Node Pools Request":{"description":"This example request creates a Kubernetes cluster with two node pools. It\nalso demonstrates setting tags, labels, auto scaling, and a maintenance\npolicy.\n","value":{"maintenance_policy":{"day":"any","start_time":720},"name":"prod-cluster-01","node_pools":[{"count":3,"name":"frontend-pool","size":"s-1vcpu-2gb","tags":["frontend"]},{"auto_scale":true,"count":2,"labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","size":"g-4vcpu-16gb"}],"region":"nyc1","tags":["production","web-team"],"version":"1.18.6-do.0"}}},"schema":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"Kubernetes Cluster Response":{"value":{"kubernetes_cluster":{"auto_upgrade":false,"cluster_subnet":"10.244.0.0/16","created_at":"2025-08-15T13:52:28.137Z","endpoint":"","ha":false,"id":"bd5f5959-5e1e-4205-a714-a914373942af","ipv4":"","maintenance_policy":{"day":"any","duration":"4h0m0s","start_time":"00:00"},"name":"prod-cluster-01","node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"worker-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"s-1vcpu-2gb","tags":["k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}],"region":"nyc1","registry_enabled":false,"service_subnet":"10.245.0.0/16","status":{"message":"provisioning","state":"provisioning"},"surge_upgrade":false,"tags":["k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af"],"updated_at":"2025-08-15T13:52:28.137Z","version":"1.18.6-do.0","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}},"Kubernetes Cluster with Multiple Node Pools Response":{"value":{"kubernetes_clusters":{"auto_upgrade":false,"cluster_subnet":"10.244.0.0/16","created_at":"2025-08-15T13:52:28.137Z","endpoint":"","ha":false,"id":"bd5f5959-5e1e-4205-a714-a914373942af","ipv4":"","maintenance_policy":{"day":"any","duration":"4h0m0s","start_time":720},"name":"prod-cluster-01","node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","frontend","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]},{"auto_scale":true,"count":2,"id":"f49f4379-7e7f-4af5-aeb6-0354bd840778","labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"3385619f-8ec3-42ba-bb23-8d21b8ba7518","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"","id":"4b8f60ff-ba06-4523-a6a4-b8148244c7e6","name":"","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"g-4vcpu-16gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}],"region":"nyc1","registry_enabled":false,"service_subnet":"10.245.0.0/16","status":{"message":"provisioning","state":"provisioning"},"surge_upgrade":false,"tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af"],"updated_at":"2025-08-15T13:52:28.137Z","version":"1.18.6-do.0","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}}},"schema":{"properties":{"kubernetes_cluster":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items"}}}}},"description":"The response will be a JSON object with a key called `kubernetes_cluster`. The\nvalue of this will be an object containing the standard attributes of a\nKubernetes cluster.\n\nThe IP address and cluster API server endpoint will not be available until the\ncluster has finished provisioning. The initial value of the cluster's\n`status.state` attribute will be `provisioning`. When the cluster is ready,\nthis will transition to `running`.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"prod-cluster-01\",\"region\": \"nyc1\",\"version\": \"1.14.1\\\n  -do.4\",\"tags\": [\"production\",\"web-team\"],\"node_pools\": [{\"size\": \"s-1vcpu-2gb\",\"count\": 3,\"name\": \"frontend-pool\",\"tags\": [\"frontend\"],\"labels\": {\"service\": \"frontend\", \"priority\": \"high\"}},{\"size\": \"c-4\",\"count\": 2,\"name\": \"backend-pool\"}]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.KubernetesClusterCreateRequest{\n        Name:        \"prod-cluster-01\",\n        RegionSlug:  \"nyc1\",\n        VersionSlug: \"1.14.1-do.4\",\n        Tags:        []string{\"production\", \"web-team\"},\n        NodePools: []*godo.KubernetesNodePoolCreateRequest{\n            &godo.KubernetesNodePoolCreateRequest{\n                Name:  \"frontend-pool\",\n                Size:  \"s-2vcpu-2gb\",\n                Count: 3,\n                Tags:  []string{\"frontend\"},\n                Labels:  map[string]string{\"service\": \"frontend\", \"priority\": \"high\"},\n            },\n            &godo.KubernetesNodePoolCreateRequest{\n                Name:  \"backend-pool\",\n                Size:  \"c-4\",\n                Count: 2,\n            },\n        },\n    }\n\n    cluster, _, err := client.Kubernetes.Create(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncluster = DropletKit::KubernetesCluster.new(\n  name: 'prod-cluster-01',\n  region: 'nyc1',\n  version: '1.14.1-do.4',\n  tags: ['production', 'web-team'],\n  node_pools: [\n    {\n      name: 'frontend-pool',\n      size: 's-2vcpu-2gb',\n      count: 3,\n      tags: ['frontend'],\n      labels: {service: 'frontend', priority: 'high'}\n    },\n    {\n      name: 'backend-pool',\n      size: 'c-4',\n      count: 2\n    }\n  ]\n)\n\nclient.kubernetes_clusters.create(cluster)"}]}},"/v2/kubernetes/clusters/{cluster_id}":{"delete":{"description":"To delete a Kubernetes cluster and all services deployed to it, send a DELETE\nrequest to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID`.\n\nA 204 status code with no body will be returned in response to a successful\nrequest.\n","operationId":"kubernetes_delete_cluster","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.Delete(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.delete(id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]},"get":{"description":"To show information about an existing Kubernetes cluster, send a GET request\nto `/v2/kubernetes/clusters/$K8S_CLUSTER_ID`.\n","operationId":"kubernetes_get_cluster","parameters":[{"description":"A unique ID that can be used to reference a Kubernetes cluster.","example":"bd5f5959-5e1e-4205-a714-a914373942af","in":"path","name":"cluster_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"Single Kubernetes Cluster":{"value":{"kubernetes_cluster":{"auto_upgrade":false,"cluster_subnet":"10.244.0.0/16","created_at":"2025-08-15T13:52:28.137Z","endpoint":"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com","ha":false,"id":"bd5f5959-5e1e-4205-a714-a914373942af","ipv4":"68.183.121.157","maintenance_policy":{"day":"any","duration":"4h0m0s","start_time":"00:00"},"name":"prod-cluster-01","node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]},{"auto_scale":true,"count":2,"id":"f49f4379-7e7f-4af5-aeb6-0354bd840778","labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545373","id":"3385619f-8ec3-42ba-bb23-8d21b8ba7518","name":"affectionate-nightingale-3nif","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545374","id":"4b8f60ff-ba06-4523-a6a4-b8148244c7e6","name":"affectionate-nightingale-3niy","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"g-4vcpu-16gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}],"region":"nyc1","registry_enabled":false,"service_subnet":"10.245.0.0/16","status":{"state":"running"},"surge_upgrade":false,"tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af"],"updated_at":"2025-08-15T13:52:28.137Z","version":"1.18.6-do.0","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}}},"schema":{"properties":{"kubernetes_cluster":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items"}}}}},"description":"The response will be a JSON object with a key called `kubernetes_cluster`. The\nvalue of this will be an object containing the standard attributes of a\nKubernetes cluster.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    cluster, _, err := client.Kubernetes.Get(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.find(id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]},"put":{"description":"To update a Kubernetes cluster, send a PUT request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID` and specify one or more of the\nattributes below.\n","operationId":"kubernetes_update_cluster","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"auto_upgrade":{"default":false,"description":"A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.","example":true,"type":"boolean"},"ha":{"default":false,"description":"A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled.","example":true,"type":"boolean"},"maintenance_policy":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/maintenance_policy"},"name":{"description":"A human-readable name for a Kubernetes cluster.","example":"prod-cluster-01","type":"string"},"surge_upgrade":{"default":false,"description":"A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes.","example":true,"type":"boolean"},"tags":{"description":"An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`.","example":["k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","production","web-team"],"items":{"type":"string"},"type":"array"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"examples":{"Updated Kubernetes Cluster":{"value":{"kubernetes_cluster":{"auto_upgrade":true,"cluster_subnet":"10.244.0.0/16","created_at":"2025-08-15T13:52:28.137Z","endpoint":"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com","ha":false,"id":"bd5f5959-5e1e-4205-a714-a914373942af","ipv4":"68.183.121.157","maintenance_policy":{"day":"any","duration":"4h0m0s","start_time":"00:00"},"name":"prod-cluster-01","node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]},{"auto_scale":true,"count":2,"id":"f49f4379-7e7f-4af5-aeb6-0354bd840778","labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545373","id":"3385619f-8ec3-42ba-bb23-8d21b8ba7518","name":"affectionate-nightingale-3nif","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"},{"created_at":"2025-08-15T13:52:28.137Z","droplet_id":"205545374","id":"4b8f60ff-ba06-4523-a6a4-b8148244c7e6","name":"affectionate-nightingale-3niy","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.137Z"}],"size":"g-4vcpu-16gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}],"region":"nyc1","registry_enabled":false,"service_subnet":"10.245.0.0/16","status":{"state":"running"},"surge_upgrade":true,"tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af"],"updated_at":"2025-08-15T13:52:28.137Z","version":"1.18.6-do.0","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}}},"schema":{"properties":{"kubernetes_cluster":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items"}}}}},"description":"The response will be a JSON object with a key called `kubernetes_cluster`. The\nvalue of this will be an object containing the standard attributes of a\nKubernetes cluster.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"stage-cluster-01\", \"tags\":[\"staging\", \"web-team\"]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.KubernetesClusterUpdateRequest{\n        Name: \"stage-cluster-01\",\n        Tags: []string{\"staging\", \"web-team\"},\n    }\n\n    cluster, _, err := client.Kubernetes.Update(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncluster = DropletKit::KubernetesCluster.new(\n  name: 'foo',\n  tags: ['staging', 'web-team']\n)\n\nclient.kubernetes_clusters.update(cluster, id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]}},"/v2/kubernetes/clusters/{cluster_id}/clusterlint":{"get":{"description":"To request clusterlint diagnostics for your cluster, send a GET request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. If the `run_id` query\nparameter is provided, then the diagnostics for the specific run is fetched.\nBy default, the latest results are shown.\n\nTo find out how to address clusterlint feedback, please refer to\n[the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md).\n","operationId":"kubernetes_get_clusterLintResults","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"description":"Specifies the clusterlint run whose results will be retrieved.","example":"50c2f44c-011d-493e-aee5-361a4a0d1844","in":"query","name":"run_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"completed_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was completed.","example":"2025-08-15T13:52:28.138Z","format":"date-time","type":"string"},"diagnostics":{"description":"An array of diagnostics reporting potential problems for the given cluster.","items":{"properties":{"check_name":{"description":"The clusterlint check that resulted in the diagnostic.","example":"unused-config-map","type":"string"},"message":{"description":"Feedback about the object for users to fix.","example":"Unused config map","type":"string"},"object":{"description":"Metadata about the Kubernetes API object the diagnostic is reported on.","properties":{"kind":{"description":"The kind of Kubernetes API object","example":"config map","type":"string"},"name":{"description":"Name of the object","example":"foo","type":"string"},"namespace":{"description":"The namespace the object resides in the cluster.","example":"kube-system","type":"string"}},"type":"object"},"severity":{"description":"Can be one of error, warning or suggestion.","example":"warning","type":"string"}},"type":"object"},"type":"array"},"requested_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was made.","example":"2025-08-15T13:52:28.138Z","format":"date-time","type":"string"},"run_id":{"description":"Id of the clusterlint run that can be used later to fetch the diagnostics.","example":"50c2f44c-011d-493e-aee5-361a4a0d1844","type":"string"}},"type":"object"}}},"description":"The response is a JSON object which contains the diagnostics on Kubernetes\nobjects in the cluster. Each diagnostic will contain some metadata information\nabout the object and feedback for users to act upon.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Fetch Clusterlint Diagnostics for a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/clusterlint\""}]},"post":{"description":"Clusterlint helps operators conform to Kubernetes best practices around\nresources, security and reliability to avoid common problems while operating\nor upgrading the clusters.\n\nTo request a clusterlint run on your cluster, send a POST request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. This will run all\nchecks present in the `doks` group by default, if a request body is not\nspecified. Optionally specify the below attributes.\n\nFor information about the available checks, please refer to\n[the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md).\n","operationId":"kubernetes_run_clusterLint","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"exclude_checks":{"description":"An array of checks that will be run when clusterlint executes checks.","example":["default-namespace"],"items":{"type":"string"},"type":"array"},"exclude_groups":{"description":"An array of check groups that will be omitted when clusterlint executes checks.","example":["workload-health"],"items":{"type":"string"},"type":"array"},"include_checks":{"description":"An array of checks that will be run when clusterlint executes checks.","example":["bare-pods","resource-requirements"],"items":{"type":"string"},"type":"array"},"include_groups":{"description":"An array of check groups that will be run when clusterlint executes checks.","example":["basic","doks","security"],"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"run_id":{"description":"ID of the clusterlint run that can be used later to fetch the diagnostics.","example":"50c2f44c-011d-493e-aee5-361a4a0d1844","type":"string"}}}}},"description":"The response is a JSON object with a key called `run_id` that you can later use to fetch the run results.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Run Clusterlint Checks on a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"include_groups\": [\"basic\"], \"include_checks\": [\"bare-pods\"]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/clusterlint\""}]}},"/v2/kubernetes/clusters/{cluster_id}/credentials":{"get":{"description":"This endpoint returns a JSON object . It can be used to programmatically\nconstruct Kubernetes clients which cannot parse kubeconfig files.\n\nThe resulting JSON object contains token-based authentication for clusters\nsupporting it, and certificate-based authentication otherwise. For a list of\nsupported versions and more information, see \"[How to Connect to a DigitalOcean\nKubernetes Cluster with kubectl](https://www.digitalocean.com/docs/kubernetes/how-to/connect-with-kubectl/)\".\n\nTo retrieve credentials for accessing a Kubernetes cluster, send a GET\nrequest to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/credentials`.\n\nClusters supporting token-based authentication may define an expiration by\npassing a duration in seconds as a query parameter to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS`.\nIf not set or 0, then the token will have a 7 day expiry. The query parameter\nhas no impact in certificate-based authentication.\n","operationId":"kubernetes_get_credentials","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1kubeconfig/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certificate_authority_data":{"description":"A base64 encoding of bytes representing the certificate authority data for accessing the cluster.","example":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURKekNDQWcrZ0F3SUJBZ0lDQm5Vd0RRWUpLb1pJaHZjTkFRRUxCUUF3TXpFVk1CTUdBMVVFQ2hNTVJHbG4KYVhSaGJFOWpaV0Z1TVJvd0dBWURWUVFERXhGck9ITmhZWE1nUTJ4MWMzUmxjaUJEUVRBZUZ3MHlNREE0TURNeApOVEkxTWpoYUZ3MDBNREE0TURNeE5USTFNamhhTURNeEZUQVRCZ05WQkFvVERFUnBaMmwwWVd4UFkyVmhiakVhCk1CZ0dBMVVFQXhNUmF6aHpZV0Z6SUVOc2RYTjBaWElnUTBFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDc21oa2JrSEpUcGhZQlN0R05VVE1ORVZTd2N3bmRtajArelQvcUZaNGsrOVNxUnYrSgpBd0lCaGpBU0JnTlZIUk1CQWY4RUNEQUdBUUgvQWdFQU1CMEdBMVVkRGdRV0JCUlRzazhhZ1hCUnFyZXdlTXJxClhwa3E1NXg5dVRBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQXB6V2F6bXNqYWxXTEx3ZjVpbWdDblNINDlKcGkKYWkvbzFMdEJvVEpleGdqZzE1ZVppaG5BMUJMc0lWNE9BZGM3UEFsL040L0hlbENrTDVxandjamRnNVdaYnMzYwozcFVUQ0g5bVVwMFg1SVdhT1VKV292Q1hGUlM1R2VKYXlkSDVPUXhqTURzR2N2UlNvZGQrVnQ2MXE3aWdFZ2I1CjBOZ1l5RnRnc2p0MHpJN3hURzZFNnlsOVYvUmFoS3lIQks2eExlM1RnUGU4SXhWa2RwT3QzR0FhSDRaK0pLR3gKYisyMVZia1NnRE1QQTlyR0VKNVZwVXlBV0FEVXZDRVFHV0hmNGpQN2ZGZlc3T050S0JWY3h3YWFjcVBVdUhzWApwRG5DZVR3V1NuUVp6L05xNmQxWUtsMFdtbkwzTEowemJzRVFGbEQ4MkkwL09MY2dZSDVxMklOZHhBPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=","format":"byte","type":"string"},"client_certificate_data":{"deprecated":true,"description":"A base64 encoding of bytes representing the x509 client\ncertificate data for access the cluster. This is only returned for clusters\nwithout support for token-based authentication.\n\nNewly created Kubernetes clusters do not return credentials using\ncertificate-based authentication. For additional information,\n[see here](https://www.digitalocean.com/docs/kubernetes/how-to/connect-to-cluster/#authenticate).\n","example":null,"format":"byte","nullable":true,"type":"string"},"client_key_data":{"deprecated":true,"description":"A base64 encoding of bytes representing the x509 client key\ndata for access the cluster. This is only returned for clusters without\nsupport for token-based authentication.\n\nNewly created Kubernetes clusters do not return credentials using\ncertificate-based authentication. For additional information,\n[see here](https://www.digitalocean.com/docs/kubernetes/how-to/connect-to-cluster/#authenticate).\n","example":null,"format":"byte","nullable":true,"type":"string"},"expires_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the access token expires.","example":"2025-08-15T13:52:28.138Z","format":"date-time","type":"string"},"server":{"description":"The URL used to access the cluster API server.","example":"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com","format":"uri","type":"string"},"token":{"description":"An access token used to authenticate with the cluster. This is only returned for clusters with support for token-based authentication.","example":"$DIGITALOCEAN_TOKEN","type":"string"}},"type":"object"}}},"description":"A JSON object containing credentials for a cluster.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Credentials for a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/credentials\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    credentials, _, err := client.Kubernetes.GetCredentials(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.credentials(id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]}},"/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources":{"get":{"description":"To list the associated billable resources that can be destroyed along with a cluster, send a GET request to the `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources` endpoint.","operationId":"kubernetes_list_associatedResources","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"An object containing the IDs of resources associated with a Kubernetes cluster.","properties":{"load_balancers":{"description":"A list of names and IDs for associated load balancers that can be destroyed along with the cluster.","example":[{"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","name":"lb-001"}],"items":{"properties":{"id":{"description":"The ID of a resource associated with a Kubernetes cluster.","example":"edb0478d-7436-11ea-86e6-0a58ac144b91","type":"string"},"name":{"description":"The name of a resource associated with a Kubernetes cluster.","example":"volume-001","type":"string"}},"type":"object"},"type":"array"},"volume_snapshots":{"description":"A list of names and IDs for associated volume snapshots that can be destroyed along with the cluster.","example":[{"id":"edb0478d-7436-11ea-86e6-0a58ac144b91","name":"snapshot-001"}],"items":{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/properties/load_balancers/items"},"type":"array"},"volumes":{"description":"A list of names and IDs for associated volumes that can be destroyed along with the cluster.","example":[{"id":"ba49449a-7435-11ea-b89e-0a58ac14480f","name":"volume-001"}],"items":{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1destroy_with_associated_resources/get/responses/200/content/application~1json/schema/properties/load_balancers/items"},"type":"array"}},"type":"object"}}},"description":"The response will be a JSON object containing `load_balancers`, `volumes`, and `volume_snapshots` keys. Each will be set to an array of objects containing the standard attributes for associated resources.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Associated Resources for Cluster Deletion","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.ListAssociatedResourcesForDeletion(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/dangerous":{"delete":{"description":"To delete a Kubernetes cluster with all of its associated resources, send a\nDELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/dangerous`.\nA 204 status code with no body will be returned in response to a successful request.\n","operationId":"kubernetes_destroy_associatedResourcesDangerous","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Cluster and All of its Associated Resources (Dangerous)","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources/dangerous\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.DeleteDangerous(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/selective":{"delete":{"description":"To delete a Kubernetes cluster along with a subset of its associated resources,\nsend a DELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/selective`.\n\nThe JSON body of the request should include `load_balancers`, `volumes`, or\n`volume_snapshots` keys each set to an array of IDs for the associated\nresources to be destroyed.\n\nThe IDs can be found by querying the cluster's associated resources endpoint.\nAny associated resource not included in the request will remain and continue\nto accrue changes on your account.\n","operationId":"kubernetes_destroy_associatedResourcesSelective","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"description":"An object containing the IDs of resources to be destroyed along with their associated with a Kubernetes cluster.","properties":{"load_balancers":{"description":"A list of IDs for associated load balancers to destroy along with the cluster.","example":["4de7ac8b-495b-4884-9a69-1050c6793cd6"],"items":{"type":"string"},"type":"array"},"volume_snapshots":{"description":"A list of IDs for associated volume snapshots to destroy along with the cluster.","example":["edb0478d-7436-11ea-86e6-0a58ac144b91"],"items":{"type":"string"},"type":"array"},"volumes":{"description":"A list of IDs for associated volumes to destroy along with the cluster.","example":["ba49449a-7435-11ea-b89e-0a58ac14480f"],"items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Selectively Delete a Cluster and its Associated Resources","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"load_balancers\": [\"4de7ac8b-495b-4884-9a69-1050c6793cd6\"],\"volumes\": [\"ba49449a-7435-11ea-b89e-0a58ac14480f\"],\"volume_snapshots\": [\"edb0478d-7436-11ea-86e6-0a58ac144b91\"]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources/selective\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    deleteReq := &godo.KubernetesClusterDeleteSelectiveRequest{Volumes: []string{\"ba49449a-7435-11ea-b89e-0a58ac14480f\"}}, _, err := client.Kubernetes.DeleteSelective(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", deleteReq)\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/kubeconfig":{"get":{"description":"This endpoint returns a kubeconfig file in YAML format. It can be used to\nconnect to and administer the cluster using the Kubernetes command line tool,\n`kubectl`, or other programs supporting kubeconfig files (e.g., client libraries).\n\nThe resulting kubeconfig file uses token-based authentication for clusters\nsupporting it, and certificate-based authentication otherwise. For a list of\nsupported versions and more information, see \"[How to Connect to a DigitalOcean\nKubernetes Cluster with kubectl](https://www.digitalocean.com/docs/kubernetes/how-to/connect-with-kubectl/)\".\n\nTo retrieve a kubeconfig file for use with a Kubernetes cluster, send a GET\nrequest to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig`.\n\nClusters supporting token-based authentication may define an expiration by\npassing a duration in seconds as a query parameter to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS`.\nIf not set or 0, then the token will have a 7 day expiry. The query parameter\nhas no impact in certificate-based authentication.\n","operationId":"kubernetes_get_kubeconfig","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"description":"The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry.","example":300,"in":"query","name":"expiry_seconds","required":false,"schema":{"default":0,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/yaml":{"example":"apiVersion: v1\nclusters:\n- cluster:\n    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURUxCUUF3TXpFVk1CTUdBMVVFQ2ftTVJHbG4KYVhSaGJFOWpaV0Z1TVJvd0dUSREERXhGck9ITmhZWE1nUTJ4MWMzUmxjaUJEUVRBZUZ3MHhPREV4TVRVeApOakF3TWpCYUZ3MHpPREV4TVRVeE5qQXdNakJhTURNeEZUQVRCZ05WQkFvVERFUnBaMmwwWVd4UFkyVmhiakVhCk1CZ0dBMVVFQXhNUmF6aHpZV0Z6SUVOc2RYTjBaWElnUTBFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDK2Z0L05Nd3pNaUxFZlFvTFU2bDgrY0hMbWttZFVKdjl4SmlhZUpIU0dZOGhPZFVEZQpGd1Zoc0pDTnVFWkpJUFh5Y0orcGpkU3pYc1lFSE03WVNKWk9xNkdaYThPMnZHUlJjN2ZQaUFJaFBRK0ZpUmYzCmRhMHNIUkZlM2hCTmU5ZE5SeTliQ2VCSTRSUlQrSEwzRFR3L2I5KytmRkdZQkRoVTEvTTZUWWRhUHR3WU0rdWgKb1pKcWJZVGJZZTFhb3R1ekdnYUpXaXRhdFdHdnNJYU8xYWthdkh0WEIOOHFxa2lPemdrSDdvd3RVY3JYM05iawozdmlVeFU4TW40MmlJaGFyeHNvTnlwdGhHOWZLMi9OdVdKTXJJS2R0Mzhwc0tkdDBFbng0MWg5K0dsMjUzMzhWCk1mdjBDVDF6SG1JanYwblIrakNkcFd0eFVLRyt0YjYzZFhNbkFnTUJBQUdqUlRCRE1BNEdBMVVkRHdFQi93UUUKQXdJQmhqQVNCZ05WSFJNQkFmOEVDREFHQVFIL0FnRUFNQjBHQTFVZERnUVdCQlNQMmJrOXJiUGJpQnZOd1Z1NQpUL0dwTFdvOTdEQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFEVjFMSGZyc1JiYVdONHE5SnBFVDMxMlluRDZ6Cm5rM3BpU1ZSYVEvM09qWG8wdHJ6Z2N4KzlVTUQxeDRHODI1RnYxc0ROWUExZEhFc2dHUmNyRkVmdGZJQWUrUVYKTitOR3NMRnQrOGZrWHdnUlpoNEU4ZUJsSVlrdEprOWptMzFMT25vaDJYZno0aGs3VmZwYkdvVVlsbmVoak1JZApiL3ZMUk05Y2EwVTJlYTB5OTNveE5pdU9PcXdrZGFjU1orczJtb3JNdGZxc3VRSzRKZDA3SENIbUFIeWpXT2k4ClVOQVUyTnZnSnBKY2RiZ3VzN2I5S3ppR1ZERklFUk04cEo4U1Nob1ZvVFFJd3d5Y2xVTU9EUUJreFFHOHNVRk8KRDE3ZjRod1dNbW5qVHY2MEJBM0dxaTZRcjdsWVFSL3drSEtQcnZjMjhoNXB0NndPWEY1b1M4OUZkUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\n    server: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com\n  name: do-nyc1-prod-cluster-01\ncontexts:\n- context:\n    cluster: do-nyc1-prod-cluster-01\n    user: do-nyc1-prod-cluster-01-admin\n  name: do-nyc1-prod-cluster-01\ncurrent-context: do-nyc1-prod-cluster-01\nkind: Config\npreferences: {}\nusers:\n- name: do-nyc1-prod-cluster-01-admin\n  user:\n    token: 403d085aaa80102277d8da97ffd2db2b6a4f129d0e2146098fdfb0cec624babc\n"}},"description":"A kubeconfig file for the cluster in YAML format.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the kubeconfig for a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/kubeconfig\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    config, _, err := client.Kubernetes.GetKubeConfig(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n\n    kubeConfigFile := string(config.KubeconfigYAML)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.kubeconfig(id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]}},"/v2/kubernetes/clusters/{cluster_id}/node_pools":{"get":{"description":"To list all of the node pools in a Kubernetes clusters, send a GET request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools`.\n","operationId":"kubernetes_list_nodePools","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"example":{"node_pools":[{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"]},{"auto_scale":true,"count":2,"id":"f49f4379-7e7f-4af5-aeb6-0354bd840778","labels":{"priority":"high","service":"backend"},"max_nodes":5,"min_nodes":2,"name":"backend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545373","id":"3385619f-8ec3-42ba-bb23-8d21b8ba7518","name":"affectionate-nightingale-3nif","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545374","id":"4b8f60ff-ba06-4523-a6a4-b8148244c7e6","name":"affectionate-nightingale-3niy","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"}],"size":"g-4vcpu-16gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"]}]},"schema":{"properties":{"node_pools":{"items":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items"},"type":"array"}}}}},"description":"The response will be a JSON object with a key called `node_pools`. This will\nbe set to an array of objects, each of which will contain the standard node\npool attributes.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Node Pools in a Kubernetes Clusters","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    nodePools, _, err := client.Kubernetes.ListNodePools(ctx, \"9b729d1c-730c-42e1-b136-59326fb1b3bb\", opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nnode_pools = client.kubernetes_clusters.node_pools(id: 'bd5f5959-5e1e-4205-a714-a914373942af')\nnode_pools.each"}]},"post":{"description":"To add an additional node pool to a Kubernetes clusters, send a POST request\nto `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools` with the following\nattributes.\n","operationId":"kubernetes_add_nodePool","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"auto_scale":true,"count":3,"max_nodes":6,"min_nodes":3,"name":"new-pool","size":"s-1vcpu-2gb","tags":["frontend"]},"schema":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"node_pool":{"auto_scale":true,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":6,"min_nodes":3,"name":"new-pool","nodes":[{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":" ","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":" ","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":" ","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":" ","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":" ","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":" ","status":{"state":"provisioning"},"updated_at":"2025-08-15T13:52:28.138Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","front-end","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}},"properties":{"node_pool":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items"}}}}},"description":"The response will be a JSON object with a key called `node_pool`. The value of\nthis will be an object containing the standard attributes of a node pool.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add a Node Pool to a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"size\": \"s-2vcpu-4gb\",\"count\": 1,\"name\": \"pool-02\",\"tags\": [\"web\"], \"labels\": {\"service\": \"web\", \"priority\": \"high\"}}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.KubernetesNodePoolCreateRequest{\n        Name:  \"pool-02\",\n        Size:  \"s-2vcpu-4gb\",\n        Count: 1,\n        Tags:  []string{\"web\"},\n        Labels:  map[string]string{\"service\": \"web\", \"priority\": \"high\"},\n    }\n\n    nodePool, _, err := client.Kubernetes.CreateNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nnode_pool = DropletKit::KubernetesNodePool.new(\n  name: 'pool-02',\n  size: 's-2vcpu-4gb',\n  count: 1,\n  tags: ['web']\n  labels: {service: 'web', priority: 'high'}\n)\n\nclient.kubernetes_clusters.create_node_pool(node_pool, id: 'bd5f5959-5e1e-4205-a714-a914373942af')"}]}},"/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}":{"delete":{"description":"To delete a node pool, send a DELETE request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`.\n\nA 204 status code with no body will be returned in response to a successful\nrequest. Nodes in the pool will subsequently be drained and deleted.\n","operationId":"kubernetes_delete_nodePool","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1node_pools~1%7Bnode_pool_id%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Node Pool in a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.DeleteNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"86c9bc8c-b2c3-4d40-8000-b0c7bee27305\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.delete_node_pool(id: 'bd5f5959-5e1e-4205-a714-a914373942af', pool_id: '86c9bc8c-b2c3-4d40-8000-b0c7bee27305')"}]},"get":{"description":"To show information about a specific node pool in a Kubernetes cluster, send\na GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`.\n","operationId":"kubernetes_get_nodePool","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"description":"A unique ID that can be used to reference a Kubernetes node pool.","example":"cdda885e-7663-40c8-bc74-3a036c66545d","in":"path","name":"node_pool_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"node_pool":{"auto_scale":false,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":{"priority":"high","service":"backend"},"max_nodes":0,"min_nodes":0,"name":"frontend-pool","nodes":[{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[{"effect":"NoSchedule","key":"priority","value":"high"}]}},"properties":{"node_pool":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items"}}}}},"description":"The response will be a JSON object with a key called `node_pool`. The value\nof this will be an object containing the standard attributes of a node pool.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve a Node Pool for a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/credentials\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    nodePool, _, err := client.Kubernetes.GetNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"cdda885e-7663-40c8-bc74-3a036c66545d\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_clusters.find_node_pool(id: 'bd5f5959-5e1e-4205-a714-a914373942af', pool_id: 'cdda885e-7663-40c8-bc74-3a036c66545d')"}]},"put":{"description":"To update the name of a node pool, edit the tags applied to it, or adjust its\nnumber of nodes, send a PUT request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID` with the\nfollowing attributes.\n","operationId":"kubernetes_update_nodePool","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1node_pools~1%7Bnode_pool_id%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items/allOf/1"}],"required":["name","count"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"example":{"node_pool":{"auto_scale":true,"count":3,"id":"cdda885e-7663-40c8-bc74-3a036c66545d","labels":null,"max_nodes":6,"min_nodes":3,"name":"renamed-pool","nodes":[{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545370","id":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","name":"adoring-newton-3niq","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545371","id":"ad12e744-c2a9-473d-8aa9-be5680500eb1","name":"adoring-newton-3nim","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"},{"created_at":"2025-08-15T13:52:28.138Z","droplet_id":"205545372","id":"e46e8d07-f58f-4ff1-9737-97246364400e","name":"adoring-newton-3ni7","status":{"state":"running"},"updated_at":"2025-08-15T13:52:28.138Z"}],"size":"s-1vcpu-2gb","tags":["production","web-team","front-end","new-tag","k8s","k8s:bd5f5959-5e1e-4205-a714-a914373942af","k8s:worker"],"taints":[]}},"properties":{"node_pool":{"$ref":"#/paths/~1v2~1kubernetes~1clusters/get/responses/200/content/application~1json/schema/allOf/0/properties/kubernetes_clusters/items/properties/node_pools/items"}}}}},"description":"The response will be a JSON object with a key called `node_pool`. The value of\nthis will be an object containing the standard attributes of a node pool.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Node Pool in a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"frontend\",\"count\": 1, \"tags\":[\"frontend\"], \"labels\": {\"service\": \"frontend\", \"priority\": \"high\"}}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.KubernetesNodePoolUpdateRequest{\n            Name:  \"frontend\",\n            Count: 1,\n            Tags:  []string{\"frontend\"},\n        Labels:  map[string]string{\"service\": \"frontend\", \"priority\": \"high\"},\n        }\n\n    nodePool, _, err := client.Kubernetes.UpdateNodePool(ctx, \"9b729d1c-730c-42e1-b136-59326fb1b3bb\", \"e7ed8f7c-6c1e-472f-adfb-4a9a1688b999\", updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nnode_pool = DropletKit::KubernetesNodePool.new(\n  name: 'frontend',\n  count: 1,\n  tags: ['frontend']\n  labels: {service: 'frontend', priority: 'high'}\n)\n\nclient.kubernetes_clusters.update_node_pool(node_pool, id: 'bd5f5959-5e1e-4205-a714-a914373942af', pool_id: '86c9bc8c-b2c3-4d40-8000-b0c7bee27305')"}]}},"/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/nodes/{node_id}":{"delete":{"description":"To delete a single node in a pool, send a DELETE request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID`.\n\nAppending the `skip_drain=1` query parameter to the request causes node\ndraining to be skipped. Omitting the query parameter or setting its value to\n`0` carries out draining prior to deletion.\n\nAppending the `replace=1` query parameter to the request causes the node to\nbe replaced by a new one after deletion. Omitting the query parameter or\nsetting its value to `0` deletes without replacement.\n","operationId":"kubernetes_delete_node","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1node_pools~1%7Bnode_pool_id%7D/get/parameters/1"},{"description":"A unique ID that can be used to reference a node in a Kubernetes node pool.","example":"478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f","in":"path","name":"node_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}},{"description":"Specifies whether or not to drain workloads from a node before it is deleted. Setting it to `1` causes node draining to be skipped. Omitting the query parameter or setting its value to `0` carries out draining prior to deletion.","example":1,"in":"query","name":"skip_drain","required":false,"schema":{"default":0,"maximum":1,"minimum":0,"type":"integer"}},{"description":"Specifies whether or not to replace a node after it has been deleted. Setting it to `1` causes the node to be replaced by a new one after deletion. Omitting the query parameter or setting its value to `0` deletes without replacement.","example":1,"in":"query","name":"replace","required":false,"schema":{"default":0,"maximum":1,"minimum":0,"type":"integer"}}],"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Node in a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305/nodes/478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f?skip_drain=0&replace=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    recycleRequest := &godo.KubernetesNodePoolRecycleNodesRequest{\n        Nodes: []string{\"3385619f-8ec3-42ba-bb23-8d21b8ba7518\", \"4b8f60ff-ba06-4523-a6a4-b8148244c7e6\"},\n    }\n\n    _, err := client.Kubernetes.RecycleNodePoolNodes(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"86c9bc8c-b2c3-4d40-8000-b0c7bee27305\", recycleRequest)\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/recycle":{"post":{"deprecated":true,"description":"The endpoint has been deprecated. Please use the DELETE\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID`\nmethod instead.\n","operationId":"kubernetes_recycle_node_pool","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1node_pools~1%7Bnode_pool_id%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"nodes":{"example":["d8db5e1a-6103-43b5-a7b3-8a948210a9fc"],"items":{"type":"string"},"type":"array"}}}}},"required":true},"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Recycle a Kubernetes Node Pool","tags":["Kubernetes"]}},"/v2/kubernetes/clusters/{cluster_id}/upgrade":{"post":{"description":"To immediately upgrade a Kubernetes cluster to a newer patch release of\nKubernetes, send a POST request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrade`.\nThe body of the request must specify a version attribute.\n\nAvailable upgrade versions for a cluster can be fetched from\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades`.\n","operationId":"kubernetes_upgrade_cluster","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"version":{"description":"The slug identifier for the version of Kubernetes that the cluster will be upgraded to.","example":"1.16.13-do.0","type":"string"}}}}},"required":true},"responses":{"202":{"$ref":"#/paths/~1v2~1databases~1%7Bdatabase_cluster_uuid%7D~1migrate/put/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Upgrade a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/upgrades\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    upgradeRequest := &godo.KubernetesClusterUpgradeRequest{\n    \tVersionSlug: \"1.12.3-do.1\",\n    }\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/upgrades":{"get":{"description":"To determine whether a cluster can be upgraded, and the versions to which it\ncan be upgraded, send a GET request to\n`/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades`.\n","operationId":"kubernetes_get_availableUpgrades","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"available_upgrade_versions":{"items":{"properties":{"kubernetes_version":{"description":"The upstream version string for the version of Kubernetes provided by a given slug.","example":"1.16.13","type":"string"},"slug":{"description":"The slug identifier for an available version of Kubernetes for use when creating or updating a cluster. The string contains both the upstream version of Kubernetes as well as the DigitalOcean revision.","example":"1.16.13-do.0","type":"string"},"supported_features":{"description":"The features available with the version of Kubernetes provided by a given slug.","example":["cluster-autoscaler","docr-integration","token-authentication"],"items":{"type":"string"},"type":"array"}},"type":"object"},"nullable":true,"type":"array"}},"type":"object"}}},"description":"The response will be a JSON object with a key called\n`available_upgrade_versions`. The value of this will be an array of objects,\nrepresenting the upgrade versions currently available for this cluster.\n\nIf the cluster is up-to-date (i.e. there are no upgrades currently available)\n`available_upgrade_versions` will be `null`.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Available Upgrades for an Existing Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/upgrades\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    upgrades, _, err := client.Kubernetes.GetUpgrades(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}"}]}},"/v2/kubernetes/clusters/{cluster_id}/user":{"get":{"description":"To show information the user associated with a Kubernetes cluster, send a GET\nrequest to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/user`.\n","operationId":"kubernetes_get_clusterUser","parameters":[{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"kubernetes_cluster_user":{"properties":{"groups":{"description":"A list of in-cluster groups that the user belongs to.","example":["k8saas:authenticated"],"items":{"type":"string"},"type":"array"},"username":{"description":"The username for the cluster admin user.","example":"sammy@digitalocean.com","format":"email","type":"string"}},"type":"object"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `kubernetes_cluster_user`\ncontaining the username and in-cluster groups that it belongs to.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve User Information for a Kubernetes Cluster","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/user\""}]}},"/v2/kubernetes/options":{"get":{"description":"To list the versions of Kubernetes available for use, the regions that support Kubernetes, and the available node sizes, send a GET request to `/v2/kubernetes/options`.","operationId":"kubernetes_list_options","responses":{"200":{"content":{"application/json":{"examples":{"All Kubernetes Options":{"value":{"options":{"regions":[{"name":"New York 1","slug":"nyc1"},{"name":"Singapore 1","slug":"sgp1"},{"name":"London 1","slug":"lon1"},{"name":"New York 3","slug":"nyc3"},{"name":"Amsterdam 3","slug":"ams3"},{"name":"Frankfurt 1","slug":"fra1"},{"name":"Toronto 1","slug":"tor1"},{"name":"San Francisco 2","slug":"sfo2"},{"name":"Bangalore 1","slug":"blr1"},{"name":"San Francisco 3","slug":"sfo3"}],"sizes":[{"name":"s-1vcpu-2gb","slug":"s-1vcpu-2gb"},{"name":"s-2vcpu-2gb","slug":"s-2vcpu-2gb"},{"name":"s-1vcpu-3gb","slug":"s-1vcpu-3gb"},{"name":"s-2vcpu-4gb","slug":"s-2vcpu-4gb"},{"name":"s-4vcpu-8gb","slug":"s-4vcpu-8gb"},{"name":"c-2-4GiB","slug":"c-2"},{"name":"g-2vcpu-8gb","slug":"g-2vcpu-8gb"},{"name":"gd-2vcpu-8gb","slug":"gd-2vcpu-8gb"},{"name":"s-8vcpu-16gb","slug":"s-8vcpu-16gb"},{"name":"s-6vcpu-16gb","slug":"s-6vcpu-16gb"},{"name":"c-4-8GiB","slug":"c-4"},{"name":"m-2vcpu-16gb","slug":"m-2vcpu-16gb"},{"name":"m3-2vcpu-16gb","slug":"m3-2vcpu-16gb"},{"name":"g-4vcpu-16gb","slug":"g-4vcpu-16gb"},{"name":"gd-4vcpu-16gb","slug":"gd-4vcpu-16gb"},{"name":"m6-2vcpu-16gb","slug":"m6-2vcpu-16gb"},{"name":"s-8vcpu-32gb","slug":"s-8vcpu-32gb"},{"name":"c-8-16GiB","slug":"c-8"},{"name":"m-4vcpu-32gb","slug":"m-4vcpu-32gb"},{"name":"m3-4vcpu-32gb","slug":"m3-4vcpu-32gb"},{"name":"g-8vcpu-32gb","slug":"g-8vcpu-32gb"},{"name":"s-12vcpu-48gb","slug":"s-12vcpu-48gb"},{"name":"gd-8vcpu-32gb","slug":"gd-8vcpu-32gb"},{"name":"m6-4vcpu-32gb","slug":"m6-4vcpu-32gb"},{"name":"s-16vcpu-64gb","slug":"s-16vcpu-64gb"},{"name":"c-16","slug":"c-16"},{"name":"m-8vcpu-64gb","slug":"m-8vcpu-64gb"},{"name":"m3-8vcpu-64gb","slug":"m3-8vcpu-64gb"},{"name":"g-16vcpu-64gb","slug":"g-16vcpu-64gb"},{"name":"s-20vcpu-96gb","slug":"s-20vcpu-96gb"},{"name":"gd-16vcpu-64gb","slug":"gd-16vcpu-64gb"},{"name":"m6-8vcpu-64gb","slug":"m6-8vcpu-64gb"},{"name":"s-24vcpu-128gb","slug":"s-24vcpu-128gb"},{"name":"c-32-64GiB","slug":"c-32"},{"name":"m-16vcpu-128gb","slug":"m-16vcpu-128gb"},{"name":"m3-16vcpu-128gb","slug":"m3-16vcpu-128gb"},{"name":"g-32vcpu-128gb","slug":"g-32vcpu-128gb"},{"name":"s-32vcpu-192gb","slug":"s-32vcpu-192gb"},{"name":"gd-32vcpu-128gb","slug":"gd-32vcpu-128gb"},{"name":"m-24vcpu-192gb","slug":"m-24vcpu-192gb"},{"name":"m6-16vcpu-128gb","slug":"m6-16vcpu-128gb"},{"name":"g-40vcpu-160gb","slug":"g-40vcpu-160gb"},{"name":"gd-40vcpu-160gb","slug":"gd-40vcpu-160gb"},{"name":"m3-24vcpu-192gb","slug":"m3-24vcpu-192gb"},{"name":"m-32vcpu-256gb","slug":"m-32vcpu-256gb"},{"name":"m6-24vcpu-192gb","slug":"m6-24vcpu-192gb"},{"name":"m3-32vcpu-256gb","slug":"m3-32vcpu-256gb"},{"name":"m6-32vcpu-256gb","slug":"m6-32vcpu-256gb"}],"versions":[{"kubernetes_version":"1.18.8","slug":"1.18.8-do.0","supported_features":["cluster-autoscaler","docr-integration","token-authentication"]},{"kubernetes_version":"1.17.11","slug":"1.17.11-do.0","supported_features":["cluster-autoscaler","docr-integration","token-authentication"]},{"kubernetes_version":"1.16.14","slug":"1.16.14-do.0","supported_features":["cluster-autoscaler","docr-integration","token-authentication"]}]}}}},"schema":{"properties":{"options":{"properties":{"regions":{"items":{"properties":{"name":{"description":"A DigitalOcean region where Kubernetes is available.","example":"New York 3","type":"string"},"slug":{"description":"The identifier for a region for use when creating a new cluster.","example":"nyc3","type":"string"}},"type":"object"},"type":"array"},"sizes":{"items":{"properties":{"name":{"description":"A Droplet size available for use in a Kubernetes node pool.","example":"s-1vcpu-2gb","type":"string"},"slug":{"description":"The identifier for a size for use when creating a new cluster.","example":"s-1vcpu-2gb","type":"string"}},"type":"object"},"type":"array"},"versions":{"items":{"$ref":"#/paths/~1v2~1kubernetes~1clusters~1%7Bcluster_id%7D~1upgrades/get/responses/200/content/application~1json/schema/properties/available_upgrade_versions/items"},"type":"array"}}}},"type":"object"}}},"description":"The response will be a JSON object with a key called `options` which contains\n`regions`, `versions`, and `sizes` objects listing the available options and\nthe matching slugs for use when creating a new cluster.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Available Regions, Node Sizes, and Versions of Kubernetes","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/kubernetes/options\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    options, _, err := client.Kubernetes.GetOptions(ctx)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.kubernetes_options.all"}]}},"/v2/kubernetes/registry":{"delete":{"description":"To remove the container registry from Kubernetes clusters, send a DELETE request to `/v2/kubernetes/registry`.","operationId":"kubernetes_remove_registry","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1kubernetes~1registry/post/requestBody/content/application~1json/schema"}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Container Registry from Kubernetes Clusters","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"cluster_uuids\": [\"bd5f5959-5e1e-4205-a714-a914373942af\", \"50c2f44c-011d-493e-aee5-361a4a0d1844\"]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/registry\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.RemoveRegistry(ctx, &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{\"bd5f5959-5e1e-4205-a714-a914373942af\"}})\n}"}]},"post":{"description":"To integrate the container registry with Kubernetes clusters, send a POST request to `/v2/kubernetes/registry`.","operationId":"kubernetes_add_registry","requestBody":{"content":{"application/json":{"schema":{"properties":{"cluster_uuids":{"description":"An array containing the UUIDs of Kubernetes clusters.","example":["bd5f5959-5e1e-4205-a714-a914373942af","50c2f44c-011d-493e-aee5-361a4a0d1844"],"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Container Registry to Kubernetes Clusters","tags":["Kubernetes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"cluster_uuids\": [\"bd5f5959-5e1e-4205-a714-a914373942af\", \"50c2f44c-011d-493e-aee5-361a4a0d1844\"]}' \\\n  \"https://api.digitalocean.com/v2/kubernetes/registry\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Kubernetes.AddRegistry(ctx, &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{\"bd5f5959-5e1e-4205-a714-a914373942af\"}})\n}"}]}},"/v2/load_balancers":{"get":{"description":"To list all of the load balancer instances on your account, send a GET request\nto `/v2/load_balancers`.\n","operationId":"loadBalancers_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"All Load Balancers":{"value":{"links":{},"load_balancers":[{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"certificate_id":"","entry_port":80,"entry_protocol":"http","target_port":80,"target_protocol":"http","tls_passthrough":false},{"certificate_id":"","entry_port":443,"entry_protocol":"https","target_port":443,"target_protocol":"https","tls_passthrough":true}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"example-lb-01","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"type":"none"},"tag":"","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"},{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[55806512,55806515,55806524],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http","tls_passthrough":false}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":443,"protocol":"https","response_timeout_seconds":5,"unhealthy_threshold":3},"http_idle_timeout_seconds":60,"id":"56775c3f-04ab-4fb3-a7ed-40ef9bc8eece","ip":"45.55.125.24","name":"prod-web-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":true,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"active","sticky_sessions":{"cookie_name":"DO-LB","cookie_ttl_seconds":300,"type":"cookies"},"tag":"prod:web","vpc_uuid":"587d698c-de84-11e8-80bc-3cfdfea9fcd1"}],"meta":{"total":2}}}},"schema":{"allOf":[{"properties":{"load_balancers":{"items":{"$ref":"#/paths/~1v2~1load_balancers/post/responses/202/content/application~1json/schema/properties/load_balancer"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with a key of `load_balancers`. This will be set to an array of objects, each of which will contain the standard load balancer attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Load Balancers","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/load_balancers\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    lbs, _, err := c.LoadBalancers.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nload_balancers = client.load_balancers.all\nload_balancers.each"}]},"post":{"description":"To create a new load balancer instance, send a POST request to\n`/v2/load_balancers`.\n\nYou can specify the Droplets that will sit behind the load balancer using one\nof two methods:\n\n* Set `droplet_ids` to a list of specific Droplet IDs.\n* Set `tag` to the name of a tag. All Droplets with this tag applied will be\n  assigned to the load balancer. Additional Droplets will be automatically\n  assigned as they are tagged.\n\nThese methods are mutually exclusive.\n","operationId":"loadBalancers_create","requestBody":{"content":{"application/json":{"examples":{"Basic Create Request":{"description":"Passing requests directly through to 80 and 443.","value":{"droplet_ids":[3164444,3164445],"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"entry_port":80,"entry_protocol":"http","target_port":80,"target_protocol":"http"},{"entry_port":443,"entry_protocol":"https","target_port":443,"target_protocol":"https","tls_passthrough":true}],"http_idle_timeout_seconds":60,"name":"example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","region":"nyc3"}},"Create Request Using Droplet Tag":{"description":"Terminating SSL at the load balancer using a managed SSL certificate specifying Droplets using `tag`.","value":{"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"name":"example-lb-01","region":"nyc3","tag":"prod:web"}},"SSL Termination Create Request":{"description":"Terminating SSL at the load balancer using a managed SSL certificate specifying Droplets using `droplet_ids`.","value":{"droplet_ids":[3164444,3164445],"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"name":"example-lb-01","region":"nyc3"}},"Sticky Sessions and Custom Health Check":{"description":"Terminating SSL at the load balancer using a managed SSL certificate specifying Droplets using `tag`.","value":{"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/health","port":8080,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"name":"example-lb-01","region":"nyc3","sticky_sessions":{"cookie_name":"LB_COOKIE","cookie_ttl_seconds":300,"type":"cookies"},"tag":"prod:web"}}},"schema":{"oneOf":[{"allOf":[{"properties":{"droplet_ids":{"description":"An array containing the IDs of the Droplets assigned to the load balancer.","example":[3164444,3164445],"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},"type":"object"},{"properties":{"algorithm":{"default":"round_robin","deprecated":true,"description":"This field has been deprecated. You can no longer specify an algorithm for load balancers.","enum":["round_robin","least_connections"],"example":"round_robin","type":"string"},"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the load balancer was created.","example":"2025-08-15T13:52:28.139Z","format":"date-time","readOnly":true,"type":"string"},"disable_lets_encrypt_dns_records":{"default":false,"description":"A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer.","example":true,"type":"boolean"},"enable_backend_keepalive":{"default":false,"description":"A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets.","example":true,"type":"boolean"},"enable_proxy_protocol":{"default":false,"description":"A boolean value indicating whether PROXY Protocol is in use.","example":true,"type":"boolean"},"firewall":{"description":"An object specifying allow and deny rules to control traffic to the load balancer.","properties":{"allow":{"default":[],"description":"the rules for allowing traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')","example":["ip:1.2.3.4","cidr:2.3.0.0/16"],"items":{"type":"string"},"type":"array"},"deny":{"default":[],"description":"the rules for denying traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')","example":["ip:1.2.3.4","cidr:2.3.0.0/16"],"items":{"type":"string"},"type":"array"}},"type":"object"},"forwarding_rules":{"description":"An array of objects specifying the forwarding rules for a load balancer.","items":{"description":"An object specifying a forwarding rule for a load balancer.","properties":{"certificate_id":{"description":"The ID of the TLS certificate used for SSL termination if enabled.","example":"892071a0-bb95-49bc-8021-3afd67a210bf","type":"string"},"entry_port":{"description":"An integer representing the port on which the load balancer instance will listen.","example":443,"type":"integer"},"entry_protocol":{"description":"The protocol used for traffic to the load balancer. The possible values are: `http`, `https`, `http2`, `http3`, `tcp`, or `udp`. If you set the  `entry_protocol` to `udp`, the `target_protocol` must be set to `udp`.  When using UDP, the load balancer requires that you set up a health  check with a port that uses TCP, HTTP, or HTTPS to work properly.\n","enum":["http","https","http2","http3","tcp","udp"],"example":"https","type":"string"},"target_port":{"description":"An integer representing the port on the backend Droplets to which the load balancer will send traffic.","example":80,"type":"integer"},"target_protocol":{"description":"The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: `http`, `https`, `http2`, `tcp`, or `udp`. If you set the `target_protocol` to `udp`, the `entry_protocol` must be set to  `udp`. When using UDP, the load balancer requires that you set up a health  check with a port that uses TCP, HTTP, or HTTPS to work properly.\n","enum":["http","https","http2","tcp","udp"],"example":"http","type":"string"},"tls_passthrough":{"description":"A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets.","example":false,"type":"boolean"}},"required":["entry_protocol","entry_port","target_protocol","target_port"],"type":"object"},"minItems":1,"type":"array"},"health_check":{"description":"An object specifying health check settings for the load balancer.","properties":{"check_interval_seconds":{"default":10,"description":"The number of seconds between between two consecutive health checks.","example":10,"type":"integer"},"healthy_threshold":{"default":3,"description":"The number of times a health check must pass for a backend Droplet to be marked \"healthy\" and be re-added to the pool.","example":3,"type":"integer"},"path":{"default":"/","description":"The path on the backend Droplets to which the load balancer instance will send a request.","example":"/","type":"string"},"port":{"default":80,"description":"An integer representing the port on the backend Droplets on which the health check will attempt a connection.","example":80,"type":"integer"},"protocol":{"default":"http","description":"The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https`, or `tcp`.","enum":["http","https","tcp"],"example":"http","type":"string"},"response_timeout_seconds":{"default":5,"description":"The number of seconds the load balancer instance will wait for a response until marking a health check as failed.","example":5,"type":"integer"},"unhealthy_threshold":{"default":5,"description":"The number of times a health check must fail for a backend Droplet to be marked \"unhealthy\" and be removed from the pool.","example":5,"type":"integer"}},"type":"object"},"http_idle_timeout_seconds":{"default":60,"description":"An integer value which configures the idle timeout for HTTP requests to the target droplets.","example":90,"maximum":600,"minimum":30,"type":"integer"},"id":{"description":"A unique ID that can be used to identify and reference a load balancer.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","format":"uuid","readOnly":true,"type":"string"},"ip":{"description":"An attribute containing the public-facing IP address of the load balancer.","example":"104.131.186.241","pattern":"^$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$","readOnly":true,"type":"string"},"name":{"description":"A human-readable name for a load balancer instance.","example":"example-lb-01","type":"string"},"project_id":{"description":"The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project. If an invalid project ID is provided, the load balancer will not be created.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","type":"string"},"redirect_http_to_https":{"default":false,"description":"A boolean value indicating whether HTTP requests to the load balancer on port 80 will be redirected to HTTPS on port 443.","example":true,"type":"boolean"},"size":{"default":"lb-small","deprecated":true,"description":"This field has been replaced by the `size_unit` field for all regions except in AMS2, NYC2, and SFO1. Each available load balancer size now equates to the load balancer having a set number of nodes.\n* `lb-small` = 1 node\n* `lb-medium` = 3 nodes\n* `lb-large` = 6 nodes\n\nYou can resize load balancers after creation up to once per hour. You cannot resize a load balancer within the first hour of its creation.","enum":["lb-small","lb-medium","lb-large"],"example":"lb-small","type":"string"},"size_unit":{"default":1,"description":"How many nodes the load balancer contains. Each additional node increases the load balancer's ability to manage more connections. Load balancers can be scaled up or down, and you can change the number of nodes after creation up to once per hour. This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use the `size` field to scale load balancers that reside in these regions.","example":3,"maximum":100,"minimum":1,"type":"integer"},"status":{"description":"A status string indicating the current state of the load balancer. This can be `new`, `active`, or `errored`.","enum":["new","active","errored"],"example":"new","readOnly":true,"type":"string"},"sticky_sessions":{"description":"An object specifying sticky sessions settings for the load balancer.","properties":{"cookie_name":{"description":"The name of the cookie sent to the client. This attribute is only returned when using `cookies` for the sticky sessions type.","example":"DO-LB","type":"string"},"cookie_ttl_seconds":{"description":"The number of seconds until the cookie set by the load balancer expires. This attribute is only returned when using `cookies` for the sticky sessions type.","example":300,"type":"integer"},"type":{"default":"none","description":"An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are `cookies` or `none`.","enum":["cookies","none"],"example":"cookies","type":"string"}},"type":"object"},"vpc_uuid":{"description":"A string specifying the UUID of the VPC to which the load balancer is assigned.","example":"c33931f2-a26a-4e61-b85c-4e95a2ec431b","format":"uuid","type":"string"}},"required":["forwarding_rules"],"type":"object"}],"required":["droplet_ids","region"],"title":"Assign Droplets by ID"},{"allOf":[{"properties":{"tag":{"description":"The name of a Droplet tag corresponding to Droplets assigned to the load balancer.","example":"prod:web","type":"string"}},"type":"object"},{"properties":{"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},"type":"object"},{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/2"}],"required":["tag","region"],"title":"Assign Droplets by Tag"}]}}},"required":true},"responses":{"202":{"content":{"application/json":{"examples":{"Basic Create Response":{"value":{"load_balancer":{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"certificate_id":"","entry_port":80,"entry_protocol":"http","target_port":80,"target_protocol":"http","tls_passthrough":false},{"certificate_id":"","entry_port":443,"entry_protocol":"https","target_port":443,"target_protocol":"https","tls_passthrough":true}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"http_idle_timeout_seconds":60,"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"type":"none"},"tag":"","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}},"Create Response Using Droplet Tag":{"value":{"load_balancer":{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"type":"none"},"tag":"prod:web","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}},"SSL Termination Create Response":{"value":{"load_balancer":{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"example-lb-01","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"type":"none"},"tag":"","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}},"Sticky Sessions and Custom Health Check":{"value":{"load_balancer":{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.139Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":false,"enable_proxy_protocol":false,"forwarding_rules":[{"certificate_id":"892071a0-bb95-49bc-8021-3afd67a210bf","entry_port":443,"entry_protocol":"https","target_port":8080,"target_protocol":"http"}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/health","port":8080,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"cookie_name":"LB_COOKIE","cookie_ttl_seconds":300,"type":"cookies"},"tag":"prod:web","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}}},"schema":{"properties":{"load_balancer":{"allOf":[{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/2"},{"properties":{"region":{"allOf":[{"description":"The region where the load balancer instance is located. When setting a region, the value should be the slug identifier for the region. When you query a load balancer, an entire region object will be returned."},{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"}],"type":"object"}},"type":"object"},{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/0","type":"object"},{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/1/allOf/0","type":"object"}]}}}}},"description":"Accepted","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"# Create new load balancer\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"example-lb-01\",\"size_unit\": 1, \"region\": \"nyc3\", \"forwarding_rules\":[{\"entry_protocol\":\"http\",\"entry_port\":80,\"target_protocol\":\"http\",\"target_port\":80,\"certificate_id\":\"\",\"tls_passthrough\":false}, {\"entry_protocol\": \"https\",\"entry_port\": 444,\"target_protocol\": \"https\",\"target_port\": 443,\"tls_passthrough\": true}], \"health_check\":{\"protocol\":\"http\",\"port\":80,\"path\":\"/\",\"check_interval_seconds\":10,\"response_timeout_seconds\":5,\"healthy_threshold\":5,\"unhealthy_threshold\":3}, \"sticky_sessions\":{\"type\":\"none\"}, \"firewall\":{\"deny\":[\"ip:1.2.3.4\",\"cidr:2.3.4.0/24\"],\"allow\":[\"cidr:1.2.0.0/16\",\"ip:2.3.4.5\"]}, \"droplet_ids\": [3164444, 3164445]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers\"\n\n# Create new load balancer with Droplet tag\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"example-lb-01\", \"region\": \"nyc3\", \"size_unit\": 1, \"forwarding_rules\":[{\"entry_protocol\":\"http\",\"entry_port\":80,\"target_protocol\":\"http\",\"target_port\":80,\"certificate_id\":\"\",\"tls_passthrough\":false}, {\"entry_protocol\": \"https\",\"entry_port\": 444,\"target_protocol\": \"https\",\"target_port\": 443,\"tls_passthrough\": true}], \"health_check\":{\"protocol\":\"http\",\"port\":80,\"path\":\"/\",\"check_interval_seconds\":10,\"response_timeout_seconds\":5,\"healthy_threshold\":5,\"unhealthy_threshold\":3}, \"sticky_sessions\":{\"type\":\"none\"}, \"firewall\":{\"deny\":[\"ip:1.2.3.4\", \"cidr:2.3.4.0/24\"],\"allow\":[\"cidr:1.2.0.0/16\",\"ip:2.3.4.5\"]}, \"tag\": \"web:prod\"}' \\\n  \"https://api.digitalocean.com/v2/load_balancers\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.LoadBalancerRequest{\n        Name:      \"example-01\",\n        SizeUnit: \"1\",\n        Algorithm: \"round_robin\",\n        Region:    \"nyc3\",\n        ForwardingRules: []godo.ForwardingRule{\n            {\n                EntryProtocol:  \"http\",\n                EntryPort:      80,\n                TargetProtocol: \"http\",\n                TargetPort:     80,\n            },\n            {\n                EntryProtocol:  \"https\",\n                EntryPort:      443,\n                TargetProtocol: \"https\",\n                TargetPort:     443,\n                TlsPassthrough: true,\n            },\n        },\n        HealthCheck: &godo.HealthCheck{\n            Protocol:               \"http\",\n            Port:                   80,\n            Path:                   \"/\",\n            CheckIntervalSeconds:   10,\n            ResponseTimeoutSeconds: 5,\n            HealthyThreshold:       5,\n            UnhealthyThreshold:     3,\n        },\n        StickySessions: &godo.StickySessions{\n            Type: \"none\",\n        },\n        DropletIDs:          []int{3164444, 3164445},\n        RedirectHttpToHttps: false,\n        Firewall:            &godo.LBFirewall{\n            Deny: []string{\"ip:1.2.3.4\", \"cidr:2.3.4.0/24\"},\n            Allow: []string{\"cidr:1.2.0.0/16\", \"ip:2.3.4.5\"},\n        }\n  // Create new load balancer with Droplet tag\n  //     Tag:                 \"web:prod\",\n  //     RedirectHttpToHttps: false,\n    }\n\n    lb, _, err := client.LoadBalancers.Create(ctx, createRequest)"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nload_balancer = DropletKit::LoadBalancer.new(\n  name: 'example-lb-01',\n  size_unit: '1',\n  algorithm: 'round_robin',\n# Create new load balancer with Droplet tag\n# tag: 'web:prod',\n  droplet_ids: [ 3164444, 3164445],\n  redirect_http_to_https: true,\n  region: 'nyc3',\n  forwarding_rules: [\n    DropletKit::ForwardingRule.new(\n      entry_protocol: 'http',\n      entry_port: 80,\n      target_protocol: 'http',\n      target_port: 80,\n      certificate_id: '',\n      tls_passthrough: false\n    ),\n    DropletKit::ForwardingRule.new(\n      entry_protocol: 'https',\n      entry_port: 443,\n      target_protocol: 'https',\n      target_port: 443,\n      certificate_id: '',\n      tls_passthrough: true\n    )\n  ],\n  sticky_sessions: DropletKit::StickySession.new(\n    type: 'cookies',\n    cookie_name: 'DO-LB',\n    cookie_ttl_seconds: 5\n  ),\n  health_check: DropletKit::HealthCheck.new(\n    protocol: 'http',\n    port: 80,\n    path: '/',\n    check_interval_seconds: 10,\n    response_timeout_seconds: 5,\n    healthy_threshold: 5,\n    unhealthy_threshold: 3\n  )\n)\nclient.load_balancers.create(load_balancer)"}]}},"/v2/load_balancers/{lb_id}":{"delete":{"description":"To delete a load balancer instance, disassociating any Droplets assigned to it\nand removing it from your account, send a DELETE request to\n`/v2/load_balancers/$LOAD_BALANCER_ID`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"loadBalancers_delete","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.LoadBalancers.Delete(ctx, \"4de7ac8b-495b-4884-9a69-1050c6793cd6\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.load_balancers.delete(id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]},"get":{"description":"To show information about a load balancer instance, send a GET request to\n`/v2/load_balancers/$LOAD_BALANCER_ID`.\n","operationId":"loadBalancers_get","parameters":[{"description":"A unique identifier for a load balancer.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"lb_id","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"load_balancer_basic_response":{"$ref":"#/paths/~1v2~1load_balancers/post/responses/202/content/application~1json/examples/Basic%20Create%20Response"}},"schema":{"properties":{"load_balancer":{"$ref":"#/paths/~1v2~1load_balancers/post/responses/202/content/application~1json/schema/properties/load_balancer"}}}}},"description":"The response will be a JSON object with a key called `load_balancer`. The\nvalue of this will be an object that contains the standard attributes\nassociated with a load balancer\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    lb, _, err := client.LoadBalancers.Get(ctx, \"4de7ac8b-495b-4884-9a69-1050c6793cd6\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.load_balancers.find(id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]},"put":{"description":"To update a load balancer's settings, send a PUT request to\n`/v2/load_balancers/$LOAD_BALANCER_ID`. The request should contain a full\nrepresentation of the load balancer including existing attributes. It may\ncontain _one of_ the `droplets_ids` or `tag` attributes as they are mutually\nexclusive. **Note that any attribute that is not provided will be reset to its\ndefault value.**\n","operationId":"loadBalancers_update","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"examples":{"load_balancer_update_request":{"value":{"algorithm":"round_robin","droplet_ids":[3164444,3164445],"enable_backend_keepalive":true,"enable_proxy_protocol":true,"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"certificate_id":"","entry_port":80,"entry_protocol":"http","target_port":80,"target_protocol":"http","tls_passthrough":false},{"certificate_id":"","entry_port":443,"entry_protocol":"https","target_port":443,"target_protocol":"https","tls_passthrough":true}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"http_idle_timeout_seconds":60,"name":"updated-example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":false,"region":"nyc3","sticky_sessions":{"type":"none"},"vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}},"schema":{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"load_balancer_update_response":{"value":{"load_balancer":{"algorithm":"round_robin","created_at":"2025-08-15T13:52:28.140Z","disable_lets_encrypt_dns_records":false,"droplet_ids":[3164444,3164445],"enable_backend_keepalive":true,"enable_proxy_protocol":true,"firewall":{"allow":["ip:1.2.3.4","cidr:2.3.4.0/24"],"deny":["cidr:1.2.0.0/16","ip:2.3.4.5"]},"forwarding_rules":[{"certificate_id":"","entry_port":80,"entry_protocol":"http","target_port":80,"target_protocol":"http","tls_passthrough":false},{"certificate_id":"","entry_port":443,"entry_protocol":"https","target_port":443,"target_protocol":"https","tls_passthrough":true}],"health_check":{"check_interval_seconds":10,"healthy_threshold":5,"path":"/","port":80,"protocol":"http","response_timeout_seconds":5,"unhealthy_threshold":3},"http_idle_timeout_seconds":60,"id":"4de7ac8b-495b-4884-9a69-1050c6793cd6","ip":"104.131.186.241","name":"updated-example-lb-01","project_id":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","redirect_http_to_https":false,"region":{"available":true,"features":["private_networking","backups","ipv6","metadata","install_agent"],"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":"lb-small","status":"new","sticky_sessions":{"type":"none"},"tag":"","vpc_uuid":"c33931f2-a26a-4e61-b85c-4e95a2ec431b"}}}},"schema":{"properties":{"load_balancer":{"$ref":"#/paths/~1v2~1load_balancers/post/responses/202/content/application~1json/schema/properties/load_balancer"}}}}},"description":"The response will be a JSON object with a key called `load_balancer`. The\nvalue of this will be an object containing the standard attributes of a\nload balancer.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"example-lb-01\",\"size_unit\":\"2\",\"region\":\"nyc3\",\"algorithm\":\"least_connections\",\"forwarding_rules\":[{\"entry_protocol\":\"http\",\"entry_port\":80,\"target_protocol\":\"http\",\"target_port\":80},{\"entry_protocol\":\"https\",\"entry_port\":444,\"target_protocol\":\"https\",\"target_port\":443,\"tls_passthrough\":true}],\"health_check\":{\"protocol\":\"http\",\"port\":80,\"path\":\"/\",\"check_interval_seconds\":10,\"response_timeout_seconds\":5,\"healthy_threshold\":5,\"unhealthy_threshold\":3},\"sticky_sessions\":{\"type\":\"cookies\", \"cookie_name\": \"DO_LB\", \"cookie_ttl_seconds\": 300}, \"firewall\":{\"deny\":[\"ip:1.2.3.4\",\"cidr:2.3.4.0/24\"], \"allow\":[\"cidr:1.2.0.0/16\",\"ip:2.3.4.5\"]}, \"droplet_ids\": [3164444, 3164445]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.LoadBalancerRequest{\n        Name:      \"example-01\",\n        SizeUnit: \"2\",\n        Algorithm: \"round_robin\",\n        Region:    \"nyc3\",\n        ForwardingRules: []godo.ForwardingRule{\n            {\n                EntryProtocol:  \"http\",\n                EntryPort:      80,\n                TargetProtocol: \"http\",\n                TargetPort:     80,\n            },\n            {\n                EntryProtocol:  \"https\",\n                EntryPort:      443,\n                TargetProtocol: \"https\",\n                TargetPort:     443,\n                TlsPassthrough: true,\n            },\n        },\n        HealthCheck: &godo.HealthCheck{\n            Protocol:               \"http\",\n            Port:                   80,\n            Path:                   \"/\",\n            CheckIntervalSeconds:   10,\n            ResponseTimeoutSeconds: 5,\n            HealthyThreshold:       5,\n            UnhealthyThreshold:     3,\n        },\n        StickySessions: &godo.StickySessions{\n            Type:             \"cookies\",\n            CookieName:       \"DO_LB\",\n            CookieTtlSeconds: 300,\n        },\n        DropletIDs:          []int{3164444, 3164445},\n        RedirectHttpToHttps: false,\n        Firewall:            &godo.LBFirewall{\n            Deny: []string{\"ip:1.2.3.4\", \"cidr:2.3.4.0/24\"},\n            Allow: []string{\"cidr:1.2.0.0/16\", \"ip:2.3.4.5\"},\n        }\n    }\n\n    lb, _, err := c.LoadBalancers.Update(ctx, \"c2c97ca7-6f63-4e23-8909-906fd86efb5e\", updateRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nload_balancer = DropletKit::LoadBalancer.new(\n  name: 'example-lb-01',\n  size_unit: '2',\n  algorithm: 'round_robin',\n  droplet_ids: [ 3164444, 3164445],\n  redirect_http_to_https: true,\n  region: 'nyc3',\n  forwarding_rules: [\n    DropletKit::ForwardingRule.new(\n      entry_protocol: 'http',\n      entry_port: 80,\n      target_protocol: 'http',\n      target_port: 80,\n      certificate_id: '',\n      tls_passthrough: false\n    ),\n    DropletKit::ForwardingRule.new(\n      entry_protocol: 'https',\n      entry_port: 443,\n      target_protocol: 'https',\n      target_port: 443,\n      certificate_id: '',\n      tls_passthrough: true\n    )\n  ],\n  sticky_sessions: DropletKit::StickySession.new(\n    type: 'cookies',\n    cookie_name: 'DO-LB-COOKIE',\n    cookie_ttl_seconds: 5\n  ),\n  health_check: DropletKit::HealthCheck.new(\n    protocol: 'http',\n    port: 80,\n    path: '/',\n    check_interval_seconds: 10,\n    response_timeout_seconds: 5,\n    healthy_threshold: 5,\n    unhealthy_threshold: 3\n  )\n)\nclient.load_balancers.update(load_balancer, id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]}},"/v2/load_balancers/{lb_id}/droplets":{"delete":{"description":"To remove a Droplet from a load balancer instance, send a DELETE request to\n`/v2/load_balancers/$LOAD_BALANCER_ID/droplets`. In the body of the request,\nthere should be a `droplet_ids` attribute containing a list of Droplet IDs.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"loadBalancers_remove_droplets","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/0","required":["droplet_ids"]}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Droplets from a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_ids\": [3164446, 3164447]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6/droplets\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    droplets := []int{3164446, 3164447}\n    _, err := client.LoadBalancers.RemoveDroplets(ctx, \"4de7ac8b-495b-4884-9a69-1050c6793cd6\", droplets...)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.load_balancers.remove_droplets([3164446, 3164447], id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]},"post":{"description":"To assign a Droplet to a load balancer instance, send a POST request to\n`/v2/load_balancers/$LOAD_BALANCER_ID/droplets`. In the body of the request,\nthere should be a `droplet_ids` attribute containing a list of Droplet IDs.\nIndividual Droplets can not be added to a load balancer configured with a\nDroplet tag. Attempting to do so will result in a \"422 Unprocessable Entity\"\nresponse from the API.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"loadBalancers_add_droplets","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/0","required":["droplet_ids"]}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Droplets to a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_ids\": [3164446, 3164447]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6/droplets\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    droplets := []int{3164446, 3164447}\n    _, err := client.LoadBalancers.AddDroplets(ctx, \"4de7ac8b-495b-4884-9a69-1050c6793cd6\", droplets...)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.load_balancers.add_droplets([3164446, 3164447], id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]}},"/v2/load_balancers/{lb_id}/forwarding_rules":{"delete":{"description":"To remove forwarding rules from a load balancer instance, send a DELETE\nrequest to `/v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules`. In the\nbody of the request, there should be a `forwarding_rules` attribute containing\nan array of rules to be removed.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"loadBalancers_remove_forwardingRules","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"forwarding_rules":{"items":{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/2/properties/forwarding_rules/items"},"minItems":1,"type":"array"}},"required":["forwarding_rules"]}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Remove Forwarding Rules from a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"forwarding_rules\": [{\"entry_protocol\": \"tcp\",\"entry_port\": 3306,\"target_protocol\": \"tcp\",\"target_port\": 3306}]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6/forwarding_rules\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    forwardingRule := []godo.ForwardingRule{\n        {\n            EntryProtocol:  \"tcp\",\n            EntryPort:      3306,\n            TargetProtocol: \"tcp\",\n            TargetPort:     3306,\n        },\n    }\n\n    _, err := client.LoadBalancers.RemoveForwardingRules(ctx, \"4de7ac8b-495b-4884-9a69-1050c6793cd6\", forwardingRule...)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nrule = DropletKit::ForwardingRule.new(\n  entry_protocol: 'tcp',\n  entry_port: 3306,\n  target_protocol: 'tcp',\n  target_port: 3306,\n  certificate_id: '',\n  tls_passthrough: false\n)\nclient.load_balancers.remove_forwarding_rules([rule], id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]},"post":{"description":"To add an additional forwarding rule to a load balancer instance, send a POST\nrequest to `/v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules`. In the body\nof the request, there should be a `forwarding_rules` attribute containing an\narray of rules to be added.\n\nNo response body will be sent back, but the response code will indicate\nsuccess. Specifically, the response code will be a 204, which means that the\naction was successful with no returned body data.\n","operationId":"loadBalancers_add_forwardingRules","parameters":[{"$ref":"#/paths/~1v2~1load_balancers~1%7Blb_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"forwarding_rules":{"items":{"$ref":"#/paths/~1v2~1load_balancers/post/requestBody/content/application~1json/schema/oneOf/0/allOf/2/properties/forwarding_rules/items"},"minItems":1,"type":"array"}},"required":["forwarding_rules"]}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Add Forwarding Rules to a Load Balancer","tags":["Load Balancers"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"forwarding_rules\": [{\"entry_protocol\": \"tcp\",\"entry_port\": 3306,\"target_protocol\": \"tcp\",\"target_port\": 3306}]}' \\\n  \"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6/forwarding_rules\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    forwardingRule := []godo.ForwardingRule{\n        {\n            EntryProtocol:  \"tcp\",\n            EntryPort:      3306,\n            TargetProtocol: \"tcp\",\n            TargetPort:     3306,\n        },\n    }\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nrule = DropletKit::ForwardingRule.new(\n  entry_protocol: 'tcp',\n  entry_port: 3306,\n  target_protocol: 'tcp',\n  target_port: 3306,\n  certificate_id: '',\n  tls_passthrough: false\n)\nclient.load_balancers.add_forwarding_rules([rule], id: '4de7ac8b-495b-4884-9a69-1050c6793cd6')"}]}},"/v2/monitoring/alerts":{"get":{"description":"Returns all alert policies that are configured for the given account. To List all alert policies, send a GET request to `/v2/monitoring/alerts`.","operationId":"monitoring_list_alertPolicy","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"policies":{"items":{"properties":{"alerts":{"properties":{"email":{"description":"An email to notify on an alert trigger.","example":["bob@exmaple.com"],"items":{"type":"string"},"type":"array"},"slack":{"description":"Slack integration details.","items":{"properties":{"channel":{"description":"Slack channel to notify of an alert trigger.","example":"Production Alerts","type":"string"},"url":{"description":"Slack Webhook URL.","example":"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ","type":"string"}},"required":["url","channel"],"type":"object"},"type":"array"}},"required":["slack","email"],"type":"object"},"compare":{"enum":["GreaterThan","LessThan"],"example":"GreaterThan","type":"string"},"description":{"example":"CPU Alert","type":"string"},"enabled":{"example":true,"type":"boolean"},"entities":{"example":["192018292"],"items":{"type":"string"},"type":"array"},"tags":{"example":["droplet_tag"],"items":{"type":"string"},"type":"array"},"type":{"enum":["v1/insights/droplet/load_1","v1/insights/droplet/load_5","v1/insights/droplet/load_15","v1/insights/droplet/memory_utilization_percent","v1/insights/droplet/disk_utilization_percent","v1/insights/droplet/cpu","v1/insights/droplet/disk_read","v1/insights/droplet/disk_write","v1/insights/droplet/public_outbound_bandwidth","v1/insights/droplet/public_inbound_bandwidth","v1/insights/droplet/private_outbound_bandwidth","v1/insights/droplet/private_inbound_bandwidth","v1/insights/lbaas/avg_cpu_utilization_percent","v1/insights/lbaas/connection_utilization_percent","v1/insights/lbaas/droplet_health","v1/insights/lbaas/tls_connections_per_second_utilization_percent","v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx","v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx","v1/insights/lbaas/increase_in_http_error_rate_count_5xx","v1/insights/lbaas/increase_in_http_error_rate_count_4xx","v1/insights/lbaas/high_http_request_response_time","v1/insights/lbaas/high_http_request_response_time_50p","v1/insights/lbaas/high_http_request_response_time_95p","v1/insights/lbaas/high_http_request_response_time_99p","v1/dbaas/alerts/load_15_alerts","v1/dbaas/alerts/memory_utilization_alerts","v1/dbaas/alerts/disk_utilization_alerts","v1/dbaas/alerts/cpu_alerts"],"example":"v1/insights/droplet/cpu","type":"string"},"uuid":{"example":"78b3da62-27e5-49ba-ac70-5db0b5935c64","type":"string"},"value":{"example":80,"format":"float","type":"number"},"window":{"enum":["5m","10m","30m","1h"],"example":"5m","type":"string"}},"required":["uuid","type","description","compare","value","window","entities","tags","alerts","enabled"],"type":"object"},"type":"array"}},"required":["policies"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"first":"https//api.digitalocean.com/v2/monitoring/alerts?page=1&per_page=10","last":"https//api.digitalocean.com/v2/monitoring/alerts?page=5&per_page=10","next":"https//api.digitalocean.com/v2/monitoring/alerts?page=4&per_page=10","prev":"https//api.digitalocean.com/v2/monitoring/alerts?page=2&per_page=10"},"meta":{"total":50},"policies":[{"alerts":{"email":["bob@example.com"],"slack":[{"channel":"Production Alerts","url":"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ\""}]},"compare":"GreaterThan","description":"CPU Alert","enabled":true,"entities":[192018292],"tags":["production_droplets"],"type":"v1/insights/droplet/cpu","uuid":"78b3da62-27e5-49ba-ac70-5db0b5935c64","value":80,"window":"5m"}]}}}},"description":"A list of alert policies.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Alert Policies","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/alerts\""}]},"post":{"description":"To create a new alert, send a POST request to `/v2/monitoring/alerts`.","operationId":"monitoring_create_alertPolicy","requestBody":{"content":{"application/json":{"schema":{"properties":{"alerts":{"$ref":"#/paths/~1v2~1monitoring~1alerts/get/responses/200/content/application~1json/schema/allOf/0/properties/policies/items/properties/alerts"},"compare":{"enum":["GreaterThan","LessThan"],"example":"GreaterThan","type":"string"},"description":{"example":"CPU Alert","type":"string"},"enabled":{"example":true,"type":"boolean"},"entities":{"example":["192018292"],"items":{"type":"string"},"type":"array"},"tags":{"example":["droplet_tag"],"items":{"type":"string"},"type":"array"},"type":{"enum":["v1/insights/droplet/load_1","v1/insights/droplet/load_5","v1/insights/droplet/load_15","v1/insights/droplet/memory_utilization_percent","v1/insights/droplet/disk_utilization_percent","v1/insights/droplet/cpu","v1/insights/droplet/disk_read","v1/insights/droplet/disk_write","v1/insights/droplet/public_outbound_bandwidth","v1/insights/droplet/public_inbound_bandwidth","v1/insights/droplet/private_outbound_bandwidth","v1/insights/droplet/private_inbound_bandwidth","v1/insights/lbaas/avg_cpu_utilization_percent","v1/insights/lbaas/connection_utilization_percent","v1/insights/lbaas/droplet_health","v1/insights/lbaas/tls_connections_per_second_utilization_percent","v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx","v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx","v1/insights/lbaas/increase_in_http_error_rate_count_5xx","v1/insights/lbaas/increase_in_http_error_rate_count_4xx","v1/insights/lbaas/high_http_request_response_time","v1/insights/lbaas/high_http_request_response_time_50p","v1/insights/lbaas/high_http_request_response_time_95p","v1/insights/lbaas/high_http_request_response_time_99p","v1/dbaas/alerts/load_15_alerts","v1/dbaas/alerts/memory_utilization_alerts","v1/dbaas/alerts/disk_utilization_alerts","v1/dbaas/alerts/cpu_alerts"],"example":"v1/insights/droplet/cpu","type":"string"},"value":{"example":80,"format":"float","type":"number"},"window":{"enum":["5m","10m","30m","1h"],"example":"5m","type":"string"}},"required":["type","description","compare","value","window","entities","tags","alerts","enabled"],"type":"object"}}},"description":"The `type` field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the `entities` array. If both the `tags` array and `entities` array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy:\n\nType | Description | Valid Entity Type\n-----|-------------|--------------------\n`v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID\n`v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID\n`v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID\n`v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID\n`v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID\n`v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID\n`v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID\n`v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID\n`v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID\n`v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID\n`v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID\n`v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx`|alert on the percent increase of 5xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx`|alert on the percent increase of 4xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_count_5xx`|alert on the count of 5xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_count_4xx`|alert on the count of 4xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time`|alert on high average http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_50p`|alert on high 50th percentile http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_95p`|alert on high 95th percentile http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_99p`|alert on high 99th percentile http response time|load balancer ID\n`v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID\n","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"policy":{"$ref":"#/paths/~1v2~1monitoring~1alerts/get/responses/200/content/application~1json/schema/allOf/0/properties/policies/items"}}}}},"description":"An alert policy.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create Alert Policy","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\                                                                                                                              \n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/alerts\" \\\n  --data '{\"alerts\":{\"email\":[\"alerts@example.com\"]},\"compare\":\"GreaterThan\",\"description\":\"CPU Alert\",\"enabled\":true,\"entities\":[\"12345678\"],\"tags\":[\"droplet_tag\"],\"type\":\"v1/insights/droplet/cpu\",\"value\":80,\"window\":\"5m\"}'"}]}},"/v2/monitoring/alerts/{alert_uuid}":{"delete":{"description":"To delete an alert policy, send a DELETE request to `/v2/monitoring/alerts/{alert_uuid}`","operationId":"monitoring_delete_alertPolicy","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1alerts~1%7Balert_uuid%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an Alert Policy","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/alerts/{alert_uuid}\""}]},"get":{"description":"To retrieve a given alert policy, send a GET request to `/v2/monitoring/alerts/{alert_uuid}`","operationId":"monitoring_get_alertPolicy","parameters":[{"description":"A unique identifier for an alert policy.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"alert_uuid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1alerts/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Alert Policy","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/alerts/78b3da62-27e5-49ba-ac70-5db0b5935c64\""}]},"put":{"description":"To update en existing policy, send a PUT request to `v2/monitoring/alerts/{alert_uuid}`.","operationId":"monitoring_update_alertPolicy","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1alerts~1%7Balert_uuid%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1monitoring~1alerts/post/requestBody/content/application~1json/schema"}}},"description":"The `type` field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the `entities` array. If both the `tags` array and `entities` array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy:\n\nType | Description | Valid Entity Type\n-----|-------------|--------------------\n`v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID\n`v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID\n`v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID\n`v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID\n`v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID\n`v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID\n`v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID\n`v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID\n`v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID\n`v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID\n`v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID\n`v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID\n`v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx`|alert on the percent increase of 5xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx`|alert on the percent increase of 4xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_count_5xx`|alert on the count of 5xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/increase_in_http_error_rate_count_4xx`|alert on the count of 4xx level http errors over 5m|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time`|alert on high average http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_50p`|alert on high 50th percentile http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_95p`|alert on high 95th percentile http response time|load balancer ID\n`v1/insights/lbaas/high_http_request_response_time_99p`|alert on high 99th percentile http response time|load balancer ID\n`v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID\n`v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID\n","required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1alerts/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update an Alert Policy","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/alerts/78b3da62-27e5-49ba-ac70-5db0b5935c64\" \\\n  --data '{\"alerts\":{\"email\":[\"alerts@example.com\"]},\"compare\":\"GreaterThan\",\"description\":\"CPU Alert\",\"enabled\":true,\"entities\":[\"12345678\"],\"tags\":[\"droplet_tag\"],\"type\":\"v1/insights/droplet/cpu\",\"value\":80,\"window\":\"5m\"}'"}]}},"/v2/monitoring/metrics/droplet/bandwidth":{"get":{"description":"To retrieve bandwidth metrics for a given Droplet, send a GET request to `/v2/monitoring/metrics/droplet/bandwidth`. Use the `interface` query parameter to specify if the results should be for the `private` or `public` interface. Use the `direction` query parameter to specify if the results should be for `inbound` or `outbound` traffic.","operationId":"monitoring_get_dropletBandwidthMetrics","parameters":[{"description":"The droplet ID.","example":"17209102","in":"query","name":"host_id","required":true,"schema":{"type":"string"}},{"description":"The network interface.","example":"private","in":"query","name":"interface","required":true,"schema":{"enum":["private","public"],"type":"string"}},{"description":"The traffic direction.","example":"inbound","in":"query","name":"direction","required":true,"schema":{"enum":["inbound","outbound"],"type":"string"}},{"description":"Timestamp to start metric window.","example":"1620683817","in":"query","name":"start","required":true,"schema":{"type":"string"}},{"description":"Timestamp to end metric window.","example":"1620705417","in":"query","name":"end","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"Inbound Private Bandwidth":{"value":{"data":{"result":[{"metric":{"direction":"inbound","host_id":"222651441","interface":"private"},"values":[[1634052360,"0.016600450090265357"],[1634052480,"0.015085955677299055"],[1634052600,"0.014941163855322308"],[1634052720,"0.016214285714285712"]]}],"resultType":"matrix"},"status":"success"}},"Inbound Public Bandwidth":{"value":{"data":{"result":[{"metric":{"direction":"inbound","host_id":"222651441","interface":"public"},"values":[[1634052360,"0.016600450090265357"],[1634052480,"0.015085955677299055"],[1634052600,"0.014941163855322308"],[1634052720,"0.016214285714285712"]]}],"resultType":"matrix"},"status":"success"}},"Outbound Private Bandwidth":{"value":{"data":{"result":[{"metric":{"direction":"outbound","host_id":"222651441","interface":"private"},"values":[[1634052360,"0.016600450090265357"],[1634052480,"0.015085955677299055"],[1634052600,"0.014941163855322308"],[1634052720,"0.016214285714285712"]]}],"resultType":"matrix"},"status":"success"}},"Outbound Public Bandwidth":{"value":{"data":{"result":[{"metric":{"direction":"outbound","host_id":"222651441","interface":"public"},"values":[[1634052360,"0.016600450090265357"],[1634052480,"0.015085955677299055"],[1634052600,"0.014941163855322308"],[1634052720,"0.016214285714285712"]]}],"resultType":"matrix"},"status":"success"}}},"schema":{"properties":{"data":{"properties":{"result":{"description":"Result of query.","items":{"properties":{"metric":{"additionalProperties":{"type":"string"},"description":"An object containing the metric labels.","example":{"host_id":"19201920"},"type":"object"},"values":{"example":[[1435781430,"1"],[1435781445,"1"]],"items":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"type":"array"}},"required":["metric","values"],"type":"object"},"type":"array"},"resultType":{"enum":["matrix"],"example":"matrix","type":"string"}},"required":["resultType","result"],"type":"object"},"status":{"enum":["success","error"],"example":"success","type":"string"}},"required":["status","data"],"type":"object"}}},"description":"The response will be a JSON object with a key called `data` and `status`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Bandwidth Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/bandwidth?host_id=222651441&interface=public&direction=outbound&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/cpu":{"get":{"description":"To retrieve CPU metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/cpu`.","operationId":"monitoring_get_DropletCpuMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"content":{"application/json":{"examples":{"CPU":{"value":{"data":{"result":[{"metric":{"host_id":"222651441","mode":"idle"},"values":[[1635386880,"122901.18"],[1635387000,"123020.92"],[1635387120,"123140.8"]]},{"metric":{"host_id":"222651441","mode":"iowait"},"values":[[1635386880,"14.99"],[1635387000,"15.01"],[1635387120,"15.01"]]},{"metric":{"host_id":"222651441","mode":"irq"},"values":[[1635386880,"0"],[1635387000,"0"],[1635387120,"0"]]},{"metric":{"host_id":"222651441","mode":"nice"},"values":[[1635386880,"66.35"],[1635387000,"66.35"],[1635387120,"66.35"]]},{"metric":{"host_id":"222651441","mode":"softirq"},"values":[[1635386880,"2.13"],[1635387000,"2.13"],[1635387120,"2.13"]]},{"metric":{"host_id":"222651441","mode":"steal"},"values":[[1635386880,"7.89"],[1635387000,"7.9"],[1635387120,"7.91"]]},{"metric":{"host_id":"222651441","mode":"system"},"values":[[1635386880,"140.09"],[1635387000,"140.2"],[1635387120,"140.23"]]},{"metric":{"host_id":"222651441","mode":"user"},"values":[[1635386880,"278.57"],[1635387000,"278.65"],[1635387120,"278.69"]]}],"resultType":"matrix"},"status":"success"}}},"schema":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/responses/200/content/application~1json/schema"}}},"description":"The response will be a JSON object with a key called `data` and `status`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet CPU Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/cpu?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/filesystem_free":{"get":{"description":"To retrieve filesystem free metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_free`.","operationId":"monitoring_get_dropletFilesystemFreeMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"content":{"application/json":{"examples":{"Filesystem":{"value":{"data":{"result":[{"metric":{"device":"/dev/vda1","fstype":"ext4","host_id":"222651441","mountpoint":"/"},"values":[[1635386880,"25832407040"],[1635387000,"25832407040"],[1635387120,"25832407040"]]}],"resultType":"matrix"},"status":"success"}}},"schema":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/responses/200/content/application~1json/schema"}}},"description":"The response will be a JSON object with a key called `data` and `status`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Filesystem Free Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/filesystem_free?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/filesystem_size":{"get":{"description":"To retrieve filesystem size metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_size`.","operationId":"monitoring_get_dropletFilesystemSizeMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1filesystem_free/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Filesystem Size Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/filesystem_size?host_id=222651441&interface=public&direction=outbound&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/load_1":{"get":{"description":"To retrieve 1 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_1`.","operationId":"monitoring_get_dropletLoad1Metrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/responses/200/content/application~1json/schema"}}},"description":"The response will be a JSON object with a key called `data` and `status`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Load1 Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/load_1?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/load_15":{"get":{"description":"To retrieve 15 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_15`.","operationId":"monitoring_get_dropletLoad15Metrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Load15 Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/load_15?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/load_5":{"get":{"description":"To retrieve 5 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_5`.","operationId":"monitoring_get_dropletLoad5Metrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Load5 Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/load_5?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/memory_available":{"get":{"description":"To retrieve available memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_available`.","operationId":"monitoring_get_dropletMemoryAvailableMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Available Memory Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/memory_available?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/memory_cached":{"get":{"description":"To retrieve cached memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_cached`.","operationId":"monitoring_get_dropletMemoryCachedMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Cached Memory Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/memory_cached?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/memory_free":{"get":{"description":"To retrieve free memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_free`.","operationId":"monitoring_get_dropletMemoryFreeMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Free Memory Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/memory_free?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/monitoring/metrics/droplet/memory_total":{"get":{"description":"To retrieve total memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_total`.","operationId":"monitoring_get_dropletMemoryTotalMetrics","parameters":[{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/0"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/3"},{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1bandwidth/get/parameters/4"}],"responses":{"200":{"$ref":"#/paths/~1v2~1monitoring~1metrics~1droplet~1load_1/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Droplet Total Memory Metrics","tags":["Monitoring"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/monitoring/metrics/droplet/memory_total?host_id=222651441&start=1636051668&end=1636051668\""}]}},"/v2/projects":{"get":{"description":"To list all your projects, send a GET request to `/v2/projects`.","operationId":"projects_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"projects":{"items":{"allOf":[{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the project was created.","example":"2025-08-15T13:52:28.141Z","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The description of the project. The maximum length is 255 characters.","example":"My website API","maxLength":255,"type":"string"},"environment":{"description":"The environment of the project's resources.","enum":["Development","Staging","Production"],"example":"Production","type":"string"},"id":{"description":"The unique universal identifier of this project.","example":"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679","format":"uuid","readOnly":true,"type":"string"},"name":{"description":"The human-readable name for the project. The maximum length is 175 characters and the name must be unique.","example":"my-web-api","maxLength":175,"type":"string"},"owner_id":{"description":"The integer id of the project owner.","example":258992,"readOnly":true,"type":"integer"},"owner_uuid":{"description":"The unique universal identifier of the project owner.","example":"99525febec065ca37b2ffe4f852fd2b2581895e7","readOnly":true,"type":"string"},"purpose":{"description":"The purpose of the project. The maximum length is 255 characters. It can\nhave one of the following values:\n\n- Just trying out DigitalOcean\n- Class project / Educational purposes\n- Website or blog\n- Web Application\n- Service or API\n- Mobile Application\n- Machine learning / AI / Data processing\n- IoT\n- Operational / Developer tooling\n\nIf another value for purpose is specified, for example, \"your custom purpose\",\nyour purpose will be stored as `Other: your custom purpose`.\n","example":"Service or API","maxLength":255,"type":"string"},"updated_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the project was updated.","example":"2025-08-15T13:52:28.141Z","format":"date-time","readOnly":true,"type":"string"}},"type":"object"},{"properties":{"is_default":{"description":"If true, all resources will be added to this project if no project is specified.","example":false,"type":"boolean"}},"type":"object"}]},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"first":"https://api.digitalocean.com/v2/projects?page=1","last":"https://api.digitalocean.com/v2/projects?page=1"}},"meta":{"total":2},"projects":[{"created_at":"2025-08-15T13:52:28.141Z","description":"My website API","environment":"Production","id":"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679","is_default":false,"name":"my-web-api","owner_id":258992,"owner_uuid":"99525febec065ca37b2ffe4f852fd2b2581895e7","purpose":"Service or API","updated_at":"2025-08-15T13:52:28.141Z"},{"created_at":"2025-08-15T13:52:28.141Z","description":"Default project","environment":"Development","id":"addb4547-6bab-419a-8542-76263a033cf6","is_default":true,"name":"Default","owner_id":258992,"owner_uuid":"99525febec065ca37b2ffe4f852fd2b2581895e7","purpose":"Just trying out DigitalOcean","updated_at":"2025-08-15T13:52:28.141Z"}]}}}},"description":"The response will be a JSON object with a key called `projects`. The value of this will be an object with the standard project attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Projects","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n      PerPage: 10,\n      Page:    1,\n    }\n\n    client.Projects.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nprojects = client.projects.all\nprojects.each"}]},"post":{"description":"To create a project, send a POST request to `/v2/projects`.","operationId":"projects_create","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items/allOf/0"}],"required":["name","purpose"]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"project":{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}}}}},"description":"The response will be a JSON object with a key called `project`. The value of this will be an object with the standard project attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"my-web-api\", \"description\": \"My website API\", \"purpose\": \"Service or API\", \"environment\": \"Production\"}' \\\n  \"https://api.digitalocean.com/v2/projects\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createReq := &godo.CreateProjectRequest{\n      Name:        \"my-web-api\",\n      Description: \"My website API\",\n      Purpose:     \"Service or API\",\n      Environment: \"Production\",\n    }\n\n    client.Projects.Create(ctx, createReq)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = DropletKit::Project.new(\n  name: 'my-api',\n  description: 'My website API',\n  purpose: 'Service or API',\n  environment: 'Production'\n)\nclient.projects.create(project)"}]}},"/v2/projects/default":{"get":{"description":"To get your default project, send a GET request to `/v2/projects/default`.","operationId":"projects_get_default","responses":{"200":{"content":{"application/json":{"schema":{"example":{"project":{"created_at":"2025-08-15T13:52:28.141Z","description":"Default project","environment":"Development","id":"addb4547-6bab-419a-8542-76263a033cf6","is_default":true,"name":"Default","owner_id":258992,"owner_uuid":"99525febec065ca37b2ffe4f852fd2b2581895e7","purpose":"Just trying out DigitalOcean","updated_at":"2025-08-15T13:52:28.141Z"}},"properties":{"project":{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}}}}},"description":"The response will be a JSON object with a key called `project`. The value of this will be an object with the standard project attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve the Default Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects/default\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    client.Projects.GetDefault(ctx)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.projects.find_default"}]},"patch":{"description":"To update only specific attributes of your default project, send a PATCH request to `/v2/projects/default`. At least one of the following attributes needs to be sent.","operationId":"projects_patch_default","requestBody":{"content":{"application/json":{"example":{"name":"my-web-api"},"schema":{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1projects/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Patch the Default Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"environment\": \"Staging\"}' \\\n  \"https://api.digitalocean.com/v2/projects/default\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateReq := &godo.UpdateProjectRequest{\n      Environment: \"Staging\",\n    }\n\n    client.Projects.Update(ctx, godo.DefaultProject, updateReq)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = client.projects.find_default\nproject.environment = 'Staging'\nclient.projects.update(project, id: 'default')"}]},"put":{"description":"To update you default project, send a PUT request to `/v2/projects/default`. All of the following attributes must be sent.","operationId":"projects_update_default","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}],"required":["name","description","purpose","environment","is_default"]}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1projects/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update the Default Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"my-web-api\", \"description\": \"My website API\", \"purpose\": \"Service or API\", \"environment\": \"Staging\", \"is_default\": false}' \\\n  \"https://api.digitalocean.com/v2/projects/default\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateReq := &godo.UpdateProjectRequest{\n      Name:        \"my-web-api\",\n      Description: \"My website API\",\n      Purpose:     \"Service or API\",\n      Environment: \"Staging\",\n      IsDefault:   false,\n    }\n\n    client.Projects.Update(ctx, godo.DefaultProject, updateReq)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = client.projects.find_default\nproject.environment = 'Staging'\nclient.projects.update(project, id: 'default')"}]}},"/v2/projects/default/resources":{"get":{"description":"To list all your resources in your default project, send a GET request to `/v2/projects/default/resources`.","operationId":"projects_list_resources_default","responses":{"200":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Default Project Resources","tags":["Project Resources"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects/default/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n      PerPage: 10,\n      Page:    1,\n    }\n\n    client.Projects.ListResources(ctx, godo.DefaultProject, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.projects.list_resources(id: 'default')"}]},"post":{"description":"To assign resources to your default project, send a POST request to `/v2/projects/default/resources`.","operationId":"projects_assign_resources_default","requestBody":{"content":{"application/json":{"examples":{"assign_resources":{"value":{"resources":["do:droplet:13457723","do:domain:example.com"]}}},"schema":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/post/requestBody/content/application~1json/schema"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/post/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Assign Resources to Default Project","tags":["Project Resources"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"resources\": [\"do:droplet:1\", \"do:floatingip:192.168.99.100\"]}' \\\n  \"https://api.digitalocean.com/v2/projects/default/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    res := []interface{}{\n      &godo.Droplet{ID: 1},\n      \"do:droplet:42\",\n      &godo.FloatingIP{IP: \"192.168.99.100\"},\n    }\n\n    client.Projects.AssignResources(ctx, godo.DefaultProject, res...)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nresource = DropletKit::ProjectAssignment.new(urn: 'do:droplet:1')\nclient.projects.assign_resources([resource], id: 'default')"}]}},"/v2/projects/{project_id}":{"delete":{"description":"To delete a project, send a DELETE request to `/v2/projects/$PROJECT_ID`. To\nbe deleted, a project must not have any resources assigned to it. Any existing\nresources must first be reassigned or destroyed, or you will receive a 412 error.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"projects_delete","parameters":[{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"412":{"content":{"application/json":{"example":{"id":"precondition_failed","message":"cannot delete a project with resources. move or remove the resources first"},"schema":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401/content/application~1json/schema"}}},"description":"Only an empty project can be deleted.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an Existing Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE -H 'Content-Type: application/json' -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Projects.Delete(ctx, '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.projects.delete(id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679') "}]},"get":{"description":"To get a project, send a GET request to `/v2/projects/$PROJECT_ID`.","operationId":"projects_get","parameters":[{"description":"A unique identifier for a project.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"project_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1projects/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    client.Projects.Get(ctx, \"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = client.projects.find(id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')"}]},"patch":{"description":"To update only specific attributes of a project, send a PATCH request to `/v2/projects/$PROJECT_ID`. At least one of the following attributes needs to be sent.","operationId":"projects_patch","parameters":[{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"name":"my-web-api"},"schema":{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1projects/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Patch a Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"environment\": \"Staging\"}' \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3\\\n  -dc3e-41f2-a18f-1b4d7ba71679\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateReq := &godo.UpdateProjectRequest{\n      Environment: \"Staging\",\n    }\n\n    client.Projects.Update(ctx, \"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\", updateReq)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = client.projects.find(id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')\nproject.environment = 'Staging'\nclient.projects.update(project, id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')"}]},"put":{"description":"To update a project, send a PUT request to `/v2/projects/$PROJECT_ID`. All of the following attributes must be sent.","operationId":"projects_update","parameters":[{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1projects/get/responses/200/content/application~1json/schema/allOf/0/properties/projects/items"}],"required":["name","description","purpose","environment","is_default"]}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1projects/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Project","tags":["Projects"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"my-web-api\", \"description\": \"My website API\", \"purpose\": \"Service or API\", \"environment\": \"Staging\", \"is_default\": false}' \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3\\\n  -dc3e-41f2-a18f-1b4d7ba71679\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateReq := &godo.UpdateProjectRequest{\n      Name:        \"my-web-api\",\n      Description: \"My website API\",\n      Purpose:     \"Service or API\",\n      Environment: \"Staging\",\n      IsDefault:   false,\n    }\n\n    client.Projects.Update(ctx, \"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\", updateReq)\n\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nproject = client.projects.find(id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')\nproject.environment = 'Staging'\nclient.projects.update(project, id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')"}]}},"/v2/projects/{project_id}/resources":{"get":{"description":"To list all your resources in a project, send a GET request to `/v2/projects/$PROJECT_ID/resources`.","operationId":"projects_list_resources","parameters":[{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"resources":{"items":{"properties":{"assigned_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the project was created.","example":"2025-08-15T13:52:28.141Z","format":"date-time","type":"string"},"links":{"description":"The links object contains the `self` object, which contains the resource relationship.","properties":{"self":{"description":"A URI that can be used to retrieve the resource.","example":"https://api.digitalocean.com/v2/droplets/13457723","format":"uri","type":"string"}},"type":"object"},"status":{"description":"The status of assigning and fetching the resources.","enum":["ok","not_found","assigned","already_assigned","service_down"],"example":"ok","type":"string"},"urn":{"description":"The uniform resource name (URN) for the resource in the format do:resource_type:resource_id.","example":"do:droplet:13457723","pattern":"^do:(dbaas|domain|droplet|floatingip|loadbalancer|space|volume|kubernetes|vpc):.*","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"first":"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1","last":"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1"}},"meta":{"total":2},"resources":[{"assigned_at":"2025-08-15T13:52:28.141Z","links":{"self":"https://api.digitalocean.com/v2/droplets/13457723"},"status":"ok","urn":"do:droplet:13457723"},{"assigned_at":"2025-08-15T13:52:28.141Z","links":{"self":"https://api.digitalocean.com/v2/domains/example.com"},"status":"ok","urn":"do:domain:example.com"}]}}}},"description":"The response will be a JSON object with a key called `resources`. The value of this will be an object with the standard resource attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Project Resources","tags":["Project Resources"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n      PerPage: 10,\n      Page:    1,\n    }\n\n    client.Projects.ListResources(ctx, \"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\", opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.projects.list_resources(id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')"}]},"post":{"description":"To assign resources to a project, send a POST request to `/v2/projects/$PROJECT_ID/resources`.","operationId":"projects_assign_resources","parameters":[{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"examples":{"assign_resources":{"value":{"resources":["do:droplet:13457723","do:domain:example.com"]}}},"schema":{"properties":{"resources":{"description":"A list of uniform resource names (URNs) to be added to a project.","example":["do:droplet:13457723"],"items":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/get/responses/200/content/application~1json/schema/allOf/0/properties/resources/items/properties/urn"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"example":{"resources":[{"assigned_at":"2025-08-15T13:52:28.141Z","links":{"self":"https://api.digitalocean.com/v2/droplets/13457723"},"status":"ok","urn":"do:droplet:13457723"},{"assigned_at":"2025-08-15T13:52:28.141Z","links":{"self":"https://api.digitalocean.com/v2/domains/example.com"},"status":"ok","urn":"do:domain:example.com"}]},"properties":{"resources":{"items":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/get/responses/200/content/application~1json/schema/allOf/0/properties/resources/items"},"type":"array"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `resources`. The value of this will be an object with the standard resource attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Assign Resources to a Project","tags":["Project Resources"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"resources\": [\"do:droplet:1\", \"do:floatingip:192.168.99.100\"]}' \\\n  \"https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    res := []interface{}{\n      &godo.Droplet{ID: 1},\n      \"do:droplet:42\",\n      &godo.FloatingIP{IP: \"192.168.99.100\"},\n    }\n\n    client.Projects.AssignResources(ctx, \"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679\", res...)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nresource = DropletKit::ProjectAssignment.new(urn: 'do:droplet:1')\nclient.projects.assign_resources([resource], id: '4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679')"}]}},"/v2/regions":{"get":{"description":"To list all of the regions that are available, send a GET request to `/v2/regions`.\nThe response will be a JSON object with a key called `regions`. The value of this will be an array of `region` objects, each of which will contain the standard region attributes.","operationId":"regions_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"regions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"},"type":"array"}},"required":["regions"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"last":"https://api.digitalocean.com/v2/regions?page=13&per_page=1","next":"https://api.digitalocean.com/v2/regions?page=2&per_page=1"}},"meta":{"total":13},"regions":[{"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"}]}}}},"description":"A JSON object with a key set to `regions`. The value is an array of `region` objects, each of which contain the standard `region` attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Data Center Regions","tags":["Regions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/regions\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    regions, _, err := client.Regions.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nregions = client.regions.all\nregions.each"}]}},"/v2/registry":{"delete":{"description":"To delete your container registry, destroying all container image data stored in it, send a DELETE request to `/v2/registry`.","operationId":"registry_delete","responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete Container Registry","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry\""}]},"get":{"description":"To get information about your container registry, send a GET request to `/v2/registry`.","operationId":"registry_get","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"registry":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the registry was created.","example":"2025-08-15T13:52:28.142Z","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"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.","example":"example","maxLength":63,"pattern":"^[a-z0-9-]{1,63}$","type":"string"},"region":{"description":"Slug of the region where registry data is stored","example":"fra1","type":"string"},"storage_usage_bytes":{"description":"The amount of storage used in the registry in bytes.","example":29393920,"readOnly":true,"type":"integer"},"storage_usage_bytes_updated_at":{"description":"The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry.","example":"2025-08-15T13:52:28.142Z","format":"date-time","readOnly":true,"type":"string"},"subscription":{"allOf":[{"readOnly":true},{"properties":{"created_at":{"description":"The time at which the subscription was created.","example":"2025-08-15T13:52:28.142Z","format":"date-time","readOnly":true,"type":"string"},"tier":{"properties":{"allow_storage_overage":{"description":"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.","example":true,"type":"boolean"},"included_bandwidth_bytes":{"description":"The amount of outbound data transfer included in the subscription tier in bytes.","example":5368709120,"type":"integer"},"included_repositories":{"description":"The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories.","example":5,"type":"integer"},"included_storage_bytes":{"description":"The amount of storage included in the subscription tier in bytes.","example":5368709120,"type":"integer"},"monthly_price_in_cents":{"description":"The monthly cost of the subscription tier in cents.","example":500,"type":"integer"},"name":{"description":"The name of the subscription tier.","example":"Basic","type":"string"},"slug":{"description":"The slug identifier of the subscription tier.","example":"basic","type":"string"},"storage_overage_price_in_cents":{"description":"The price paid in cents per GiB for additional storage beyond what is included in the subscription plan.","example":2,"type":"integer"}},"type":"object"},"updated_at":{"description":"The time at which the subscription was last updated.","example":"2025-08-15T13:52:28.142Z","format":"date-time","readOnly":true,"type":"string"}},"type":"object"}]}},"type":"object"}}}}},"description":"The response will be a JSON object with the key `registry` containing information about your registry.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Container Registry Information","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry\""}]},"post":{"description":"To create your container registry, send a POST request to `/v2/registry`.\n\nThe `name` becomes part of the URL for images stored in the registry. For\nexample, if your registry is called `example`, an image in it will have the\nURL `registry.digitalocean.com/example/image:tag`.\n","operationId":"registry_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"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.","example":"example","maxLength":63,"pattern":"^[a-z0-9-]{1,63}$","type":"string"},"region":{"description":"Slug of the region where registry data is stored. When not provided, a region will be selected.","enum":["nyc3","sfo3","ams3","sgp1","fra1"],"example":"fra1","type":"string"},"subscription_tier_slug":{"description":"The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint.","enum":["starter","basic","professional"],"example":"basic","type":"string"}},"required":["name","subscription_tier_slug"],"type":"object"}}},"required":true},"responses":{"201":{"$ref":"#/paths/~1v2~1registry/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create Container Registry","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"example\", \"subscription_tier_slug\": \"basic\", \"region\": \"fra1\"}' \\\n  \"https://api.digitalocean.com/v2/registry\""}]}},"/v2/registry/docker-credentials":{"get":{"description":"In order to access your container registry with the Docker client or from a\nKubernetes cluster, you will need to configure authentication. The necessary\nJSON configuration can be retrieved by sending a GET request to\n`/v2/registry/docker-credentials`.\n\nThe response will be in the format of a Docker `config.json` file. To use the\nconfig in your Kubernetes cluster, create a Secret with:\n\n    kubectl create secret generic docr \\\n      --from-file=.dockerconfigjson=config.json \\\n      --type=kubernetes.io/dockerconfigjson\n\nBy default, the returned credentials have read-only access to your registry\nand cannot be used to push images. This is appropriate for most Kubernetes\nclusters. To retrieve read/write credentials, suitable for use with the Docker\nclient or in a CI system, read_write may be provided as query parameter. For\nexample: `/v2/registry/docker-credentials?read_write=true`\n\nBy default, the returned credentials will not expire. To retrieve credentials\nwith an expiry set, expiry_seconds may be provided as a query parameter. For\nexample: `/v2/registry/docker-credentials?expiry_seconds=3600` will return\ncredentials that expire after one hour.\n","operationId":"registry_get_dockerCredentials","parameters":[{"description":"The duration in seconds that the returned registry credentials will be valid. If not set or 0, the credentials will not expire.","example":3600,"in":"query","name":"expiry_seconds","required":false,"schema":{"default":0,"minimum":0,"type":"integer"}},{"description":"By default, the registry credentials allow for read-only access. Set this query parameter to `true` to obtain read-write credentials.","example":true,"in":"query","name":"read_write","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"auths":{"properties":{"registry.digitalocean.com":{"properties":{"auth":{"description":"A base64 encoded string containing credentials for the container registry.","example":"YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}},"description":"A Docker `config.json` file for the container registry.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Docker Credentials for Container Registry","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/docker-credentials\""}]}},"/v2/registry/options":{"get":{"description":"This endpoint serves to provide additional information as to which option values are available when creating a container registry.\nThere 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.\nThere are multiple regions available for container registry and controls where your data is stored.\nTo list the available options, send a GET request to `/v2/registry/options`.","operationId":"registry_get_options","responses":{"200":{"content":{"application/json":{"example":{"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"}]}},"schema":{"properties":{"options":{"properties":{"available_regions":{"example":["nyc3"],"items":{"type":"string"},"type":"array"},"subscription_tiers":{"items":{"allOf":[{"$ref":"#/paths/~1v2~1registry/get/responses/200/content/application~1json/schema/properties/registry/properties/subscription/allOf/1/properties/tier"},{"properties":{"eligibility_reasons":{"description":"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.","example":["OverRepositoryLimit"],"items":{"enum":["OverRepositoryLimit","OverStorageLimit"],"type":"string"},"type":"array"},"eligible":{"description":"A boolean indicating whether your account it eligible to use a certain subscription tier.","example":true,"type":"boolean"}},"type":"object"}]},"type":"array"}},"type":"object"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `options` which contains a key called `subscription_tiers` listing the available tiers.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Registry Options (Subscription Tiers and Available Regions)","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/options\""}]}},"/v2/registry/subscription":{"get":{"description":"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`.","operationId":"registry_get_subscription","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"subscription":{"$ref":"#/paths/~1v2~1registry/get/responses/200/content/application~1json/schema/properties/registry/properties/subscription/allOf/1"}}}}},"description":"The response will be a JSON object with a key called `subscription` containing information about your subscription.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Subscription Information","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/subscription\""}]},"post":{"description":"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`.","operationId":"registry_update_subscription","requestBody":{"content":{"application/json":{"schema":{"properties":{"tier_slug":{"description":"The slug of the subscription tier to sign up for.","enum":["starter","basic","professional"],"example":"basic","type":"string"}},"type":"object"}}}},"responses":{"200":{"$ref":"#/paths/~1v2~1registry~1subscription/get/responses/200"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update Subscription Tier","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"tier_slug\": \"professional\"}' \\\n  \"https://api.digitalocean.com/v2/registry/subscription\""}]}},"/v2/registry/validate-name":{"post":{"description":"To validate that a container registry name is available for use, send a POST\nrequest to `/v2/registry/validate-name`.\n\nIf the name is both formatted correctly and available, the response code will\nbe 204 and contain no body. If the name is already in use, the response will\nbe a 409 Conflict.\n","operationId":"registry_validate_name","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"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.","example":"example","maxLength":63,"pattern":"^[a-z0-9-]{1,63}$","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"409":{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1destroy_with_associated_resources~1retry/post/responses/409"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Validate a Container Registry Name","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\": \"example\"}' \\\n  \"https://api.digitalocean.com/v2/registry/validate-name\""}]}},"/v2/registry/{registry_name}/garbage-collection":{"get":{"description":"To get information about the currently-active garbage collection for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collection`.","operationId":"registry_get_garbageCollection","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"}],"responses":{"200":{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1garbage-collection/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Get Active Garbage Collection","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/garbage-collection\""}]},"post":{"description":"Garbage collection enables users to clear out unreferenced blobs (layer &\nmanifest data) after deleting one or more manifests from a repository. If\nthere are no unreferenced blobs resulting from the deletion of one or more\nmanifests, garbage collection is effectively a noop.\n[See here for more information](https://www.digitalocean.com/docs/container-registry/how-to/clean-up-container-registry/)\nabout how and why you should clean up your container registry periodically.\n\nTo request a garbage collection run on your registry, send a POST request to\n`/v2/registry/$REGISTRY_NAME/garbage-collection`. This will initiate the\nfollowing sequence of events on your registry.\n\n* Set the registry to read-only mode, meaning no further write-scoped\n  JWTs will be issued to registry clients. Existing write-scoped JWTs will\n  continue to work until they expire which can take up to 15 minutes.\n* Wait until all existing write-scoped JWTs have expired.\n* Scan all registry manifests to determine which blobs are unreferenced.\n* Delete all unreferenced blobs from the registry.\n* Record the number of blobs deleted and bytes freed, mark the garbage\n  collection status as `success`.\n* Remove the read-only mode restriction from the registry, meaning write-scoped\n  JWTs will once again be issued to registry clients.\n","operationId":"registry_run_garbageCollection","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"garbage_collection":{"properties":{"blobs_deleted":{"description":"The number of blobs deleted as a result of this garbage collection.","example":42,"type":"integer"},"created_at":{"description":"The time the garbage collection was created.","example":"2025-08-15T13:52:28.142Z","format":"date-time","type":"string"},"freed_bytes":{"description":"The number of bytes freed as a result of this garbage collection.","example":667,"type":"integer"},"registry_name":{"description":"The name of the container registry.","example":"example","type":"string"},"status":{"description":"The current status of this garbage collection.","enum":["requested","waiting for write JWTs to expire","scanning manifests","deleting unreferenced blobs","cancelling","failed","succeeded","cancelled"],"example":"requested","type":"string"},"updated_at":{"description":"The time the garbage collection was last updated.","example":"2025-08-15T13:52:28.142Z","format":"date-time","type":"string"},"uuid":{"description":"A string specifying the UUID of the garbage collection.","example":"eff0feee-49c7-4e8f-ba5c-a320c109c8a8","type":"string"}},"type":"object"}},"type":"object"}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Start Garbage Collection","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/garbage-collection\""}]}},"/v2/registry/{registry_name}/garbage-collection/{garbage_collection_uuid}":{"put":{"description":"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.","operationId":"registry_update_garbageCollection","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"description":"The UUID of a garbage collection run.","example":"eff0feee-49c7-4e8f-ba5c-a320c109c8a8","in":"path","name":"garbage_collection_uuid","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cancel":{"description":"A boolean value indicating that the garbage collection should be cancelled.","example":true,"type":"boolean"}},"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1garbage-collection/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update Garbage Collection","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/garbage-collection/example-gc-uuid\""}]}},"/v2/registry/{registry_name}/garbage-collections":{"get":{"description":"To get information about past garbage collections for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collections`.","operationId":"registry_list_garbageCollections","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"example":{"garbage_collections":[{"blobs_deleted":42,"created_at":"2025-08-15T13:52:28.142Z","freed_bytes":667,"registry_name":"example","status":"requested","updated_at":"2025-08-15T13:52:28.142Z","uuid":"eff0feee-49c7-4e8f-ba5c-a320c109c8a8"}],"meta":{"total":1}},"schema":{"properties":{"garbage_collections":{"items":{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1garbage-collection/post/responses/201/content/application~1json/schema/properties/garbage_collection"},"type":"array"}},"type":"object"}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Garbage Collections","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/garbage-collections\""}]}},"/v2/registry/{registry_name}/repositories":{"get":{"deprecated":true,"description":"This endpoint has been deprecated in favor of the _List All Container Registry Repositories [V2]_ endpoint.\n\nTo list all repositories in your container registry, send a GET\nrequest to `/v2/registry/$REGISTRY_NAME/repositories`.\n","operationId":"registry_list_repositories","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"description":"The name of a container registry.","example":"example","in":"path","name":"registry_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"repositories":{"items":{"properties":{"latest_tag":{"properties":{"compressed_size_bytes":{"description":"The compressed size of the tag in bytes.","example":2803255,"type":"integer"},"manifest_digest":{"description":"The digest of the manifest associated with the tag.","example":"sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221","type":"string"},"registry_name":{"description":"The name of the container registry.","example":"example","type":"string"},"repository":{"description":"The name of the repository.","example":"repo-1","type":"string"},"size_bytes":{"description":"The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available).","example":5861888,"type":"integer"},"tag":{"description":"The name of the tag.","example":"latest","type":"string"},"updated_at":{"description":"The time the tag was last updated.","example":"2025-08-15T13:52:28.142Z","format":"date-time","type":"string"}},"type":"object"},"name":{"description":"The name of the repository.","example":"repo-1","type":"string"},"registry_name":{"description":"The name of the container registry.","example":"example","type":"string"},"tag_count":{"description":"The number of tags in the repository.","example":1,"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"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":"2025-08-15T13:52:28.142Z"},"name":"repo-1","registry_name":"example","tag_count":1}]}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Container Registry Repositories","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositories\""}]}},"/v2/registry/{registry_name}/repositoriesV2":{"get":{"description":"To list all repositories in your container registry, send a GET request to `/v2/registry/$REGISTRY_NAME/repositoriesV2`.","operationId":"registry_list_repositoriesV2","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"description":"Which 'page' of paginated results to return. Ignored when 'page_token' is provided.","example":1,"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Token to retrieve of the next or previous set of results more quickly than using 'page'.","example":"eyJUb2tlbiI6IkNnZGpiMjlz","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"repositories":{"items":{"properties":{"latest_manifest":{"properties":{"blobs":{"description":"All blobs associated with this manifest","items":{"properties":{"compressed_size_bytes":{"description":"The compressed size of the blob in bytes.","example":2803255,"type":"integer"},"digest":{"description":"The digest of the blob","example":"sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221","type":"string"}},"type":"object"},"type":"array"},"compressed_size_bytes":{"description":"The compressed size of the manifest in bytes.","example":2803255,"type":"integer"},"digest":{"description":"The manifest digest","example":"sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221","type":"string"},"registry_name":{"description":"The name of the container registry.","example":"example","type":"string"},"repository":{"description":"The name of the repository.","example":"repo-1","type":"string"},"size_bytes":{"description":"The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available).","example":5861888,"type":"integer"},"tags":{"description":"All tags associated with this manifest","example":["latest","v1","v2"],"items":{"type":"string"},"type":"array"},"updated_at":{"description":"The time the manifest was last updated.","example":"2025-08-15T13:52:28.142Z","format":"date-time","type":"string"}},"type":"object"},"manifest_count":{"description":"The number of manifests in the repository.","example":1,"type":"integer"},"name":{"description":"The name of the repository.","example":"repo-1","type":"string"},"registry_name":{"description":"The name of the container registry.","example":"example","type":"string"},"tag_count":{"description":"The number of tags in the repository.","example":1,"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"last":"https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=5&per_page=1","next":"https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=2&page_token=JPZmZzZXQiOjB9&per_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":"2025-08-15T13:52:28.142Z"},"manifest_count":82,"name":"repo-1","registry_name":"example","tag_count":57}]}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Container Registry Repositories (V2)","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositoriesV2?page_size=1\""},{"lang":"cURL (next page)","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=2&page_token=JPZmZzZXQiOjB9&per_page=1\""}]}},"/v2/registry/{registry_name}/{repository_name}/digests":{"get":{"description":"To list all manifests in your container registry repository, send a GET\nrequest to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests`.\n\nNote that if your repository name contains `/` characters, it must be\nURL-encoded in the request URL. For example, to list manifests for\n`registry.digitalocean.com/example/my/repo`, the path would be\n`/v2/registry/example/repositories/my%2Frepo/digests`.\n","operationId":"registry_list_repositoryManifests","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1%7Brepository_name%7D~1tags/get/parameters/3"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"manifests":{"items":{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositoriesV2/get/responses/200/content/application~1json/schema/allOf/0/properties/repositories/items/properties/latest_manifest"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"first":"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1&per_page=1","last":"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3&per_page=1","next":"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3&per_page=1","prev":"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1&per_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":"2025-08-15T13:52:28.143Z"}],"meta":{"total":3}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Container Registry Repository Manifests","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests\""}]}},"/v2/registry/{registry_name}/{repository_name}/digests/{manifest_digest}":{"delete":{"description":"To delete a container repository manifest by digest, send a DELETE request to\n`/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST`.\n\nNote that if your repository name contains `/` characters, it must be\nURL-encoded in the request URL. For example, to delete\n`registry.digitalocean.com/example/my/repo@sha256:abcd`, the path would be\n`/v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"registry_delete_repositoryManifest","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1%7Brepository_name%7D~1tags/get/parameters/3"},{"description":"The manifest digest of a container registry repository tag.","example":"sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221","in":"path","name":"manifest_digest","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete Container Registry Repository Manifest","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests/sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221\""}]}},"/v2/registry/{registry_name}/{repository_name}/tags":{"get":{"description":"To list all tags in your container registry repository, send a GET\nrequest to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags`.\n\nNote that if your repository name contains `/` characters, it must be\nURL-encoded in the request URL. For example, to list tags for\n`registry.digitalocean.com/example/my/repo`, the path would be\n`/v2/registry/example/repositories/my%2Frepo/tags`.\n","operationId":"registry_list_repositoryTags","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"description":"The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`.","example":"repo-1","in":"path","name":"repository_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"tags":{"items":{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/responses/200/content/application~1json/schema/allOf/0/properties/repositories/items/properties/latest_tag"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"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":"2025-08-15T13:52:28.143Z"}]}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Container Registry Repository Tags","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/tags\""}]}},"/v2/registry/{registry_name}/{repository_name}/tags/{repository_tag}":{"delete":{"description":"To delete a container repository tag, send a DELETE request to\n`/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG`.\n\nNote that if your repository name contains `/` characters, it must be\nURL-encoded in the request URL. For example, to delete\n`registry.digitalocean.com/example/my/repo:mytag`, the path would be\n`/v2/registry/example/repositories/my%2Frepo/tags/mytag`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"registry_delete_repositoryTag","parameters":[{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1repositories/get/parameters/2"},{"$ref":"#/paths/~1v2~1registry~1%7Bregistry_name%7D~1%7Brepository_name%7D~1tags/get/parameters/3"},{"description":"The name of a container registry repository tag.","example":"06a447a","in":"path","name":"repository_tag","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete Container Registry Repository Tag","tags":["Container Registry"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/registry/example/repositories/repo-1/tags/mytag\""}]}},"/v2/reports/droplet_neighbors_ids":{"get":{"description":"To retrieve a list of all Droplets that are co-located on the same physical\nhardware, send a GET request to `/v2/reports/droplet_neighbors_ids`.\n\nThe results will be returned as a JSON object with a key of `neighbor_ids`.\nThis will be set to an array of arrays. Each array will contain a set of\nDroplet IDs for Droplets that share a physical server. An empty array\nindicates that all Droplets associated with your account are located on\nseparate physical hardware.\n","operationId":"droplets_list_neighborsIds","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"neighbor_ids":{"description":"An array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server.","example":[[168671828,168663509,168671815],[168671883,168671750]],"items":{"items":{"type":"integer"},"type":"array"},"type":"array"}},"type":"object"}}},"description":"A JSON object with an `neighbor_ids` key.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Droplet Neighbors","tags":["Droplets"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reports/droplet_neighbors_ids\""}]}},"/v2/reserved_ips":{"get":{"description":"To list all of the reserved IPs available on your account, send a GET request to `/v2/reserved_ips`.","operationId":"reservedIPs_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"reserved_ips":{"items":{"properties":{"droplet":{"anyOf":[{"description":"If the reserved IP is not assigned to a Droplet, the value will be null.","nullable":true,"title":"null","type":"object"},{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items"}],"description":"The Droplet that the reserved IP has been assigned to. When you query a reserved 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.","example":null},"ip":{"description":"The public IP address of the reserved IP. It also serves as its identifier.","example":"45.55.96.47","format":"ipv4","type":"string"},"locked":{"description":"A boolean value indicating whether or not the reserved IP has pending actions preventing new ones from being submitted.","example":true,"type":"boolean"},"project_id":{"description":"The UUID of the project to which the reserved IP currently belongs.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"},"region":{"allOf":[{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"},{"description":"The region that the reserved IP is reserved to. When you query a reserved IP, the entire region object will be returned.","type":"object"}]}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{},"meta":{"total":1},"reserved_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"}}]}}}},"description":"The response will be a JSON object with a key called `reserved_ips`. This will be set to an array of reserved IP objects, each of which will contain the standard reserved IP attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Reserved IPs","tags":["Reserved IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reserved_ips?page=1&per_page=20\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    reservedIPs, _, err := client.ReservedIPs.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nreserved_ips = client.reserved_ips.all\nreserved_ips.each"}]},"post":{"description":"On creation, a reserved IP must be either assigned to a Droplet or reserved to a region.\n* To create a new reserved IP assigned to a Droplet, send a POST\n  request to `/v2/reserved_ips` with the `droplet_id` attribute.\n\n* To create a new reserved IP reserved to a region, send a POST request to\n  `/v2/reserved_ips` with the `region` attribute.\n\n**Note**:  In addition to the standard rate limiting, only 12 reserved IPs may be created per 60 seconds.","operationId":"reservedIPs_create","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"droplet_id":{"description":"The ID of the Droplet that the reserved IP will be assigned to.","example":2457247,"type":"integer"}},"required":["droplet_id"],"title":"Assign to Droplet","type":"object"},{"properties":{"project_id":{"description":"The UUID of the project to which the reserved IP will be assigned.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"},"region":{"description":"The slug identifier for the region the reserved IP will be reserved to.","example":"nyc3","type":"string"}},"required":["region"],"title":"Reserve to Region","type":"object"}]}}},"required":true},"responses":{"202":{"content":{"application/json":{"examples":{"reserved_ip_assigning":{"summary":"Assigning to Droplet","value":{"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"}]},"reserved_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"}}}},"reserved_ip_reserving":{"summary":"Reserving to Region","value":{"links":{},"reserved_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"}}}}},"schema":{"properties":{"links":{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1droplets/post/responses/202/content/application~1json/schema/oneOf/0/properties/links/properties/actions/items"},"type":"array"},"droplets":{"items":{"$ref":"#/paths/~1v2~1droplets/post/responses/202/content/application~1json/schema/oneOf/0/properties/links/properties/actions/items"},"type":"array"}},"type":"object"},"reserved_ip":{"$ref":"#/paths/~1v2~1reserved_ips/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `reserved_ip`. The value of this will be an object that contains the standard attributes associated with a reserved IP.\nWhen assigning a reserved 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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Reserved IP","tags":["Reserved IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"droplet_id\": 123456}' \\\n  \"https://api.digitalocean.com/v2/reserved_ips\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.ReservedIPCreateRequest{\n        DropletID: 123456,\n\n    }\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nreserved_ip = DropletKit::ReservedIp.new(droplet_id: 123456)\nclient.reserved_ips.create(reserved_ip) "}]}},"/v2/reserved_ips/{reserved_ip}":{"delete":{"description":"To delete a reserved IP and remove it from your account, send a DELETE request\nto `/v2/reserved_ips/$RESERVED_IP_ADDR`.\n\nA successful request will receive a 204 status code with no body in response.\nThis indicates that the request was processed successfully.\n","operationId":"reservedIPs_delete","parameters":[{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Reserved IP","tags":["Reserved IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.ReservedIPs.Delete(ctx, \"45.55.96.34\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.reserved_ips.delete(ip: '45.55.96.47') "}]},"get":{"description":"To show information about a reserved IP, send a GET request to `/v2/reserved_ips/$RESERVED_IP_ADDR`.","operationId":"reservedIPs_get","parameters":[{"description":"A reserved IP address.","example":"45.55.96.47","in":"path","name":"reserved_ip","required":true,"schema":{"format":"ipv4","minimum":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"reserved_ip_assigned":{"summary":"Assigned to Droplet","value":{"reserved_ip":{"droplet":{"backup_ids":[53893572],"created_at":"2025-08-15T13:52:28.143Z","disk":25,"features":["backups","private_networking","ipv6"],"id":3164444,"image":{"created_at":"2025-08-15T13:52:28.143Z","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":"2025-08-15T13:52:28.143Z","start":"2025-08-15T13:52:28.143Z"},"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"}}}},"reserved_ip_reserved":{"summary":"Reserved to Region","value":{"reserved_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"}}}}},"schema":{"properties":{"reserved_ip":{"$ref":"#/paths/~1v2~1reserved_ips/get/responses/200/content/application~1json/schema/allOf/0/properties/reserved_ips/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `reserved_ip`. The value of this will be an object that contains the standard attributes associated with a reserved IP.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Reserved IP","tags":["Reserved IPs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    reservedIP, _, err := client.ReservedIPs.Get(ctx, \"45.55.96.47\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.reserved_ips.find(ip: '45.55.96.47')"}]}},"/v2/reserved_ips/{reserved_ip}/actions":{"get":{"description":"To retrieve all actions that have been executed on a reserved IP, send a GET request to `/v2/reserved_ips/$RESERVED_IP/actions`.","operationId":"reservedIPsActions_list","parameters":[{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"actions":[{"completed_at":"2025-08-15T13:52:28.143Z","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":"reserved_ip","started_at":"2025-08-15T13:52:28.143Z","status":"completed","type":"reserve_ip"}],"links":{},"meta":{"total":1}}}}},"description":"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 reserved IP action attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Actions for a Reserved IP","tags":["Reserved IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    actions, _, err := client.ReservedIPActions.List(ctx, '45.55.96.47', opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nactions = client.reserved_ip_actions.all(ip: '45.55.96.47')\nactions.each"}]},"post":{"description":"To initiate an action on a reserved IP send a POST request to\n`/v2/reserved_ips/$RESERVED_IP/actions`. In the JSON body to the request,\nset the `type` attribute to on of the supported action types:\n\n| Action     | Details\n|------------|--------\n| `assign`   | Assigns a reserved IP to a Droplet\n| `unassign` | Unassign a reserved IP from a Droplet\n","operationId":"reservedIPsActions_post","parameters":[{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"discriminator":{"mapping":{"assign":"#/reserved_ip_action_assign","unassign":"#/reserved_ip_action_unassign"},"propertyName":"type"},"properties":{"type":{"description":"The type of action to initiate for the reserved IP.","enum":["assign","unassign"],"type":"string"}},"required":["type"],"type":"object"},{"required":["type"],"type":"object"}]},{"allOf":[{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D~1actions/post/requestBody/content/application~1json/schema/anyOf/0/allOf/0"},{"properties":{"droplet_id":{"description":"The ID of the Droplet that the reserved IP will be assigned to.","example":758604968,"type":"integer"}},"required":["type","droplet_id"],"type":"object"}]}],"discriminator":{"mapping":{"assign":"models/reserved_ip_actions.yml#/reserved_ip_action_assign","unassign":"models/reserved_ip_actions.yml#/reserved_ip_action_unassign"},"propertyName":"type"}}}},"description":"The `type` attribute set in the request body will specify the action that\nwill be taken on the reserved IP.\n"},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"action":{"completed_at":"2025-08-15T13:52:28.145Z","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":"reserved_ip","started_at":"2025-08-15T13:52:28.145Z","status":"completed","type":"assign_ip"}},"properties":{"action":{"allOf":[{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"},{"properties":{"project_id":{"description":"The UUID of the project to which the reserved IP currently belongs.","example":"746c6152-2fa2-11ed-92d3-27aaa54e4988","format":"uuid","type":"string"}},"type":"object"}]}}}}},"description":"The response will be an object with a key called `action`. The value of this will be an object that contains the standard reserved IP action attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate a Reserved IP Action","tags":["Reserved IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Assign a Reserved IP to a Droplet\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"assign\",\"droplet_id\":8219222}' \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions\"\n\n# Unassign a Reserved IP\n# curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"unassign\"}' \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n  // Assign a Reserved IP to a Droplet\n    action, _, err := client.ReservedIPActions.Assign(ctx, \"45.55.96.47\", 8219222)\n\n  // Unassign a Reserved IP\n  // action, _, err := client.ReservedIPActions.Unassign(ctx, \"45.55.96.47\")  \n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Assign a Reserved IP to a Droplet\nclient.reserved_ip_actions.assign(ip: '45.55.96.47', droplet_id: 8219222)\n\n# Unassign a Reserved IP\n# client.reserved_ip_actions.unassign(ip: '45.55.96.47')"}]}},"/v2/reserved_ips/{reserved_ip}/actions/{action_id}":{"get":{"description":"To retrieve the status of a reserved IP action, send a GET request to `/v2/reserved_ips/$RESERVED_IP/actions/$ACTION_ID`.","operationId":"reservedIPsActions_get","parameters":[{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/parameters/0"}],"responses":{"200":{"$ref":"#/paths/~1v2~1reserved_ips~1%7Breserved_ip%7D~1actions/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Reserved IP Action","tags":["Reserved IP Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions/72531856\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.ReservedIPActions.Get(ctx, \"45.55.96.47\", 72531856)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.reserved_ip_actions.find(ip: '45.55.96.47', id: 72531856)"}]}},"/v2/sizes":{"get":{"description":"To list all of available Droplet sizes, send a GET request to `/v2/sizes`.\nThe response will be a JSON object with a key called `sizes`. The value of this will be an array of `size` objects each of which contain the standard size attributes.","operationId":"sizes_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"sizes":{"items":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/size"},"type":"array"}},"required":["sizes"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{"pages":{"last":"https://api.digitalocean.com/v2/sizes?page=64&per_page=1","next":"https://api.digitalocean.com/v2/sizes?page=2&per_page=1"}},"meta":{"total":64},"sizes":[{"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}]}}}},"description":"A JSON object with a key called `sizes`. The value of this will be an array of `size` objects each of which contain the standard size attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Droplet Sizes","tags":["Sizes"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/sizes\" "},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    sizes, _, err := client.Sizes.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nsizes = client.sizes.all\nsizes.each"}]}},"/v2/snapshots":{"get":{"description":"To list all of the snapshots available on your account, send a GET request to\n`/v2/snapshots`.\n\nThe response will be a JSON object with a key called `snapshots`. This will be\nset to an array of `snapshot` objects, each of which will contain the standard\nsnapshot attributes.\n\n### Filtering Results by Resource Type\n\nIt's possible to request filtered results by including certain query parameters.\n\n#### List Droplet Snapshots\n\nTo retrieve only snapshots based on Droplets, include the `resource_type`\nquery parameter set to `droplet`. For example, `/v2/snapshots?resource_type=droplet`.\n\n#### List Volume Snapshots\n\nTo retrieve only snapshots based on volumes, include the `resource_type`\nquery parameter set to `volume`. For example, `/v2/snapshots?resource_type=volume`.\n","operationId":"snapshots_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"},{"description":"Used to filter snapshots by a resource type.","example":"droplet","in":"query","name":"resource_type","required":false,"schema":{"enum":["droplet","volume"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"All Snapshots":{"value":{"links":{},"meta":{"total":2},"snapshots":[{"created_at":"2025-08-15T13:52:28.145Z","id":"6372321","min_disk_size":25,"name":"web-01-1595954862243","regions":["nyc3","sfo3"],"resource_id":"200776916","resource_type":"droplet","size_gigabytes":2.34,"tags":["web","env:prod"]},{"created_at":"2025-08-15T13:52:28.145Z","id":"fbe805e8-866b-11e6-96bf-000f53315a41","min_disk_size":2,"name":"pvc-01-1595954862243","regions":["nyc1"],"resource_id":"89bcc42f-85cf-11e6-a004-000f53315871","resource_type":"volume","size_gigabytes":0.1008,"tags":["k8s"]}]}},"Droplets Snapshots":{"value":{"links":{},"meta":{"total":1},"snapshots":[{"created_at":"2025-08-15T13:52:28.145Z","id":"6372321","min_disk_size":25,"name":"web-01-1595954862243","regions":["nyc3","sfo3"],"resource_id":"200776916","resource_type":"droplet","size_gigabytes":2.34,"tags":["web","env:prod"]}]}},"Volume Snapshots":{"value":{"links":{},"meta":{"total":1},"snapshots":[{"created_at":"2025-08-15T13:52:28.145Z","id":"fbe805e8-866b-11e6-96bf-000f53315a41","min_disk_size":2,"name":"pvc-01-1595954862243","regions":["nyc1"],"resource_id":"89bcc42f-85cf-11e6-a004-000f53315871","resource_type":"volume","size_gigabytes":0.1008,"tags":["k8s"]}]}}},"schema":{"allOf":[{"properties":{"snapshots":{"items":{"allOf":[{"properties":{"id":{"description":"The unique identifier for the snapshot.","example":"6372321","type":"string"}},"required":["id"],"type":"object"},{"$ref":"#/paths/~1v2~1droplets~1%7Bdroplet_id%7D~1backups/get/responses/200/content/application~1json/schema/allOf/0/properties/backups/items/allOf/1"},{"properties":{"resource_id":{"description":"The unique identifier for the resource that the snapshot originated from.","example":"200776916","type":"string"},"resource_type":{"description":"The type of resource that the snapshot originated from.","enum":["droplet","volume"],"example":"droplet","type":"string"},"tags":{"description":"An array of Tags the snapshot has been tagged with.","example":["web","env:prod"],"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["resource_id","resource_type","tags"],"type":"object"}]},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"A JSON object with a key of `snapshots`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Snapshots","tags":["Snapshots"],"x-codeSamples":[{"lang":"cURL","source":"# List all snapshots\ncurl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots?page=1&per_page=1\"\n\n# List all Droplet snapshots\ncurl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots?page=1&per_page=1&resource_type=droplet\"\n\n# List volume snapshots\ncurl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots?page=1&per_page=1&resource_type=volume\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n// List all snapshots\n    snapshots, _, err := client.Snapshots.List(ctx, opt)\n\n// List all Droplet snapshots\n//  snapshots, _, err := client.Snapshots.ListDroplet(ctx, opt)\n\n// List all volume snapshots\n//  snapshots, _, err := client.Snapshots.ListVolume(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# List all snapshots\nsnapshots = client.snapshots.all\nsnapshots.each\n\n# List all Droplet snapshots\n# snapshots = client.snapshots.all(resource_type: 'droplet')\n# snapshots.each\n\n# List volume snapshots\n# snapshots = client.snapshots.all(resource_type: 'volume')\n# snapshots.each"}]}},"/v2/snapshots/{snapshot_id}":{"delete":{"description":"Both Droplet and volume snapshots are managed through the `/v2/snapshots/`\nendpoint. To delete a snapshot, send a DELETE request to\n`/v2/snapshots/$SNAPSHOT_ID`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n","operationId":"snapshots_delete","parameters":[{"$ref":"#/paths/~1v2~1snapshots~1%7Bsnapshot_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Snapshot","tags":["Snapshots"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Snapshots.Delete(ctx, 'fbe805e8-866b-11e6-96bf-000f53315a41')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.snapshots.delete(id: 'fbe805e8-866b-11e6-96bf-000f53315a41')"}]},"get":{"description":"To retrieve information about a snapshot, send a GET request to\n`/v2/snapshots/$SNAPSHOT_ID`.\n\nThe response will be a JSON object with a key called `snapshot`. The value of\nthis will be an snapshot object containing the standard snapshot attributes.\n","operationId":"snapshots_get","parameters":[{"description":"Either the ID of an existing snapshot. This will be an integer for a Droplet snapshot or a string for a volume snapshot.","example":6372321,"in":"path","name":"snapshot_id","required":true,"schema":{"anyOf":[{"description":"The ID of a Droplet snapshot.","example":6372321,"type":"integer"},{"description":"The ID of a volume snapshot.","example":"fbe805e8-866b-11e6-96bf-000f53315a41","type":"string"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"snapshot":{"$ref":"#/paths/~1v2~1snapshots/get/responses/200/content/application~1json/schema/allOf/0/properties/snapshots/items"}}}}},"description":"A JSON object with a key called `snapshot`.\n","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Snapshot","tags":["Snapshots"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    snapshot, _, err := client.Snapshots.Get(ctx, 'fbe805e8-866b-11e6-96bf-000f53315a41')\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nsnapshot = client.snapshots.find(id: 'fbe805e8-866b-11e6-96bf-000f53315a41')"}]}},"/v2/tags":{"get":{"description":"To list all of your tags, you can send a GET request to `/v2/tags`.","operationId":"tags_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"tags":{"items":{"description":"A tag is a label that can be applied to a resource (currently Droplets, Images, Volumes, Volume Snapshots, and Database clusters) in order to better organize or facilitate the lookups and actions on it.\nTags have two attributes: a user defined `name` attribute and an embedded `resources` attribute with information about resources that have been tagged.","properties":{"name":{"description":"The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores.\nThere is a limit of 255 characters per tag.\n\n**Note:** Tag names are case stable, which means the capitalization you use when you first create a tag is canonical.\n\nWhen working with tags in the API, you must use the tag's canonical capitalization. For example, if you create a tag named \"PROD\", the URL to add that tag to a resource would be `https://api.digitalocean.com/v2/tags/PROD/resources` (not `/v2/tags/prod/resources`).\n\nTagged resources in the control panel will always display the canonical capitalization. For example, if you create a tag named \"PROD\", you can tag resources in the control panel by entering \"prod\". The tag will still display with its canonical capitalization, \"PROD\".\n","example":"extra-awesome","maxLength":255,"pattern":"^[a-zA-Z0-9_\\-\\:]+$","type":"string"},"resources":{"allOf":[{"description":"Tagged Resource Statistics include metadata regarding the resource type that has been tagged.","properties":{"count":{"description":"The number of tagged objects for this type of resource.","example":5,"minimum":0,"type":"integer"},"last_tagged_uri":{"description":"The URI for the last tagged object for this type of resource.","example":"https://api.digitalocean.com/v2/images/7555620","type":"string"}},"type":"object"},{"properties":{"databases":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items/properties/resources/allOf/0"},"droplets":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items/properties/resources/allOf/0"},"imgages":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items/properties/resources/allOf/0"},"volume_snapshots":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items/properties/resources/allOf/0"},"volumes":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items/properties/resources/allOf/0"}}}],"description":"An embedded object containing key value pairs of resource type and resource statistics. It also includes a count of the total number of resources tagged with the current tag as well as a `last_tagged_uri` attribute set to the last resource tagged with the current tag.","example":{"count":5,"databases":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/databases/b92438f6-ba03-416c-b642-e9236db91976"},"droplets":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/droplets/3164444"},"images":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620"},"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620","volume_snapshots":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/snapshots/1f6f46e8-6b60-11e9-be4e-0a58ac144519"},"volumes":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/volumes/3d80cb72-342b-4aaa-b92e-4e4abb24a933"}},"readOnly":true,"type":"object"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{},"meta":{"total":1},"tags":[{"name":"extra-awesome","resources":{"count":5,"databases":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/databases/b92438f6-ba03-416c-b642-e9236db91976"},"droplets":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/droplets/3164444"},"images":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620"},"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620","volume_snapshots":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/snapshots/1f6f46e8-6b60-11e9-be4e-0a58ac144519"},"volumes":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/volumes/3d80cb72-342b-4aaa-b92e-4e4abb24a933"}}}]}}}},"description":"To list all of your tags, you can send a `GET` request to `/v2/tags`.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Tags","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/tags\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n    tags, _, err := client.Tags.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ntags = client.tags.all\ntags.each"}]},"post":{"description":"To create a tag you can send a POST request to `/v2/tags` with a `name` attribute.","operationId":"tags_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"tag":{"name":"extra-awesome","resources":{"count":0,"databases":{"count":0},"droplets":{"count":0},"images":{"count":0},"volume_snapshots":{"count":0},"volumes":{"count":0}}}},"properties":{"tag":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items"}}}}},"description":"The response will be a JSON object with a key called tag.  The value of this will be a tag object containing the standard tag attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"content":{"application/json":{"examples":{"InvalidCharacters":{"value":{"error":"Error validating resource tag: \\\"tag-name \\\\\\\"здорово\\\\\\\" contains invalid characters\\\"","messages":null,"root_causes":["rpc error: code = InvalidArgument desc = Error validating resource tag: \\\"tag-name \\\\\\\"здорово\\\\\\\" contains invalid characters\\\""]}}},"schema":{"properties":{"error":{"description":"A message providing information about the error.","example":"not_found","type":"string"},"messages":{"description":"A list of error messages.","example":null,"items":{"type":"string"},"nullable":true,"type":"array"},"root_causes":{"description":"A list of underlying causes for the error, including details to help  resolve it when possible.","example":[],"items":{"type":"string"},"type":"array"}},"required":["error","root_causes"],"type":"object"}}},"description":"Bad Request","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"},"x-request-id":{"description":"Optionally, some endpoints may include a request ID that should be provided  when reporting bugs or opening support tickets to help identify the issue.","example":"515850a0-a812-50bf-aa3c-d0d21d287e40","schema":{"format":"uuid","type":"string"}}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Tag","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"awesome\"}' \\\n  \"https://api.digitalocean.com/v2/tags\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &TagCreateRequest{\n        Name: \"testing-1\",\n    }\n    client.Tags.Create(ctx, request)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ntag = DropletKit::Tag.new(name: 'awesome')\nclient.tags.create(tag)"}]}},"/v2/tags/{tag_id}":{"delete":{"description":"A tag can be deleted by sending a `DELETE` request to `/v2/tags/$TAG_NAME`. Deleting a tag also untags all the resources that have previously been tagged by the Tag","operationId":"tags_delete","parameters":[{"$ref":"#/paths/~1v2~1tags~1%7Btag_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Tag","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/tags/awesome\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    client.Tags.Delete(ctx, \"awesome\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.tags.delete(name: 'awesome')"}]},"get":{"description":"To retrieve an individual tag, you can send a `GET` request to `/v2/tags/$TAG_NAME`.","operationId":"tags_get","parameters":[{"description":"The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag.","example":"awesome","in":"path","name":"tag_id","required":true,"schema":{"maxLength":255,"pattern":"^[a-zA-Z0-9_\\-\\:]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"tag":{"tag":{"name":"extra-awesome","resources":{"count":5,"databases":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/databases/b92438f6-ba03-416c-b642-e9236db91976"},"droplets":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/droplets/3164444"},"images":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620"},"last_tagged_uri":"https://api.digitalocean.com/v2/images/7555620","volume_snapshots":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/snapshots/1f6f46e8-6b60-11e9-be4e-0a58ac144519"},"volumes":{"count":1,"last_tagged_uri":"https://api.digitalocean.com/v2/volumes/3d80cb72-342b-4aaa-b92e-4e4abb24a933"}}}}},"properties":{"tag":{"$ref":"#/paths/~1v2~1tags/get/responses/200/content/application~1json/schema/allOf/0/properties/tags/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `tag`.  The value of this will be a tag object containing the standard tag attributes.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve a Tag","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/tags/awesome\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    tag, _, err := client.Tags.Get(ctx, \"awesome\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.tags.find(name: 'awesome')"}]}},"/v2/tags/{tag_id}/resources":{"delete":{"description":"Resources can be untagged by sending a DELETE request to `/v2/tags/$TAG_NAME/resources` with an array of json objects containing `resource_id` and `resource_type` attributes.\nCurrently only untagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. `resource_type` is expected to be the string `droplet`, `database`, `image`, `volume` or `volume_snapshot`. `resource_id` is expected to be the ID of the resource as a string.","operationId":"tags_unassign_resources","parameters":[{"$ref":"#/paths/~1v2~1tags~1%7Btag_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1tags~1%7Btag_id%7D~1resources/post/requestBody/content/application~1json/schema"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Untag a Resource","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"resources\":[{\"resource_id\":\"9569411\",\"resource_type\":\"droplet\"},{\"resource_id\":\"7555620\",\"resource_type\":\"image\"},{\"resource_id\":\"3d80cb72-342b-4aaa-b92e-4e4abb24a933\",\"resource_type\":\"volume\"}]}' \\\n  \"https://api.digitalocean.com/v2/tags/awesome/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    untagResourcesRequest := &godo.UntagResourcesRequest{\n        Resources: []Resource{{ID: \"11457573\", Type: \"droplet\"},{ID: \"7555620\", Type: \"image\"},{ID: \"3d80cb72-342b-4aaa-b92e-4e4abb24a933\", Type: \"volume\"}},\n    }\n    client.Tags.UntagResources(ctx, \"awesome\", untagResourcesRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.tags.untag_resources(name: 'awesome', resources: [{ resource_id: '9569411', resource_type: 'droplet' },{ resource_id: '7555620', resource_type: 'image' },{ resource_id: '3d80cb72-342b-4aaa-b92e-4e4abb24a933', resource_type: 'volume' }])"}]},"post":{"description":"Resources can be tagged by sending a POST request to `/v2/tags/$TAG_NAME/resources` with an array of json objects containing `resource_id` and `resource_type` attributes.\nCurrently only tagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. `resource_type` is expected to be the string `droplet`, `database`, `image`, `volume` or `volume_snapshot`. `resource_id` is expected to be the ID of the resource as a string.","operationId":"tags_assign_resources","parameters":[{"$ref":"#/paths/~1v2~1tags~1%7Btag_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"resources":{"description":"An array of objects containing resource_id and resource_type  attributes.","example":[{"resource_id":"9569411","resource_type":"droplet"},{"resource_id":"7555620","resource_type":"image"},{"resource_id":"3d80cb72-342b-4aaa-b92e-4e4abb24a933","resource_type":"volume"}],"items":{"properties":{"resource_id":{"description":"The identifier of a resource.","example":"3d80cb72-342b-4aaa-b92e-4e4abb24a933","type":"string"},"resource_type":{"description":"The type of the resource.","enum":["droplet","image","volume","volume_snapshot"],"example":"volume","type":"string"}}},"type":"array"}},"required":["resources"],"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Tag a Resource","tags":["Tags"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"resources\":[{\"resource_id\":\"9569411\",\"resource_type\":\"droplet\"},{\"resource_id\":\"7555620\",\"resource_type\":\"image\"},{\"resource_id\":\"3d80cb72-342b-4aaa-b92e-4e4abb24a933\",\"resource_type\":\"volume\"}]}' \\\n  \"https://api.digitalocean.com/v2/tags/awesome/resources\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n    tags, _, err := client.Tags.List(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.tags.tag_resources(name: 'awesome', resources: [{ resource_id: '9569411', resource_type: 'droplet' },{ resource_id: '7555620', resource_type: 'image' },{ resource_id: '3d80cb72-342b-4aaa-b92e-4e4abb24a933', resource_type: 'volume'}])"}]}},"/v2/uptime/checks":{"get":{"description":"To list all of the Uptime checks on your account, send a GET request to `/v2/uptime/checks`.","operationId":"uptime_checks_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"checks":{"items":{"allOf":[{"properties":{"id":{"description":"A unique ID that can be used to identify and reference the check.","example":"5a4981aa-9653-4bd1-bef5-d6bff52042e4","format":"uuid","readOnly":true,"type":"string"}},"type":"object"},{"properties":{"enabled":{"default":true,"description":"A boolean value indicating whether the check is enabled/disabled.","example":true,"type":"boolean"},"name":{"description":"A human-friendly display name.","example":"Landing page check","type":"string"},"regions":{"description":"An array containing the selected regions to perform healthchecks from.","example":["us_east","eu_west"],"items":{"enum":["us_east","us_west","eu_west","se_asia"],"type":"string"},"type":"array"},"target":{"description":"The endpoint to perform healthchecks on.","example":"https://www.landingpage.com","format":"url","type":"string"},"type":{"description":"The type of health check to perform.","enum":["ping","http","https"],"example":"https","type":"string"}},"type":"object"}],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"The response will be a JSON object with a key called `checks`. This will be set to an array of objects, each of which will contain the standard attributes associated with an uptime check","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Checks","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks\""}]},"post":{"description":"To create an Uptime check, send a POST request to `/v2/uptime/checks` specifying the attributes\nin the table below in the JSON body.\n","operationId":"uptime_check_create","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1uptime~1checks/get/responses/200/content/application~1json/schema/allOf/0/properties/checks/items/allOf/1"}],"required":["name","method","target","regions","type","enabled"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"check":{"$ref":"#/paths/~1v2~1uptime~1checks/get/responses/200/content/application~1json/schema/allOf/0/properties/checks/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `check`. The value of this will be an object that contains the standard attributes associated with an uptime check.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Check","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"Landing page check\",\"type\":\"https\",\"target\":\"https://www.landingpage.com\",\"regions\":[\"us_east\",\"eu_west\"],\"enabled\":true}' \\\n  \"https://api.digitalocean.com/v2/uptime/checks\""}]}},"/v2/uptime/checks/{check_id}":{"delete":{"description":"To delete an Uptime check, send a DELETE request to `/v2/uptime/checks/$CHECK_ID`. A 204 status\ncode with no body will be returned in response to a successful request.\n\n\nDeleting a check will also delete alerts associated with the check.\n","operationId":"uptime_check_delete","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Check","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}\""}]},"get":{"description":"To show information about an existing check, send a GET request to `/v2/uptime/checks/$CHECK_ID`.","operationId":"uptime_check_get","parameters":[{"description":"A unique identifier for a check.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"check_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1uptime~1checks/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Check","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}\""}]},"put":{"description":"To update the settings of an Uptime check, send a PUT request to `/v2/uptime/checks/$CHECK_ID`.\n","operationId":"uptime_check_update","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1uptime~1checks/get/responses/200/content/application~1json/schema/allOf/0/properties/checks/items/allOf/1"}],"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1uptime~1checks/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a Check","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"Landing page check\",\"type\":\"https\",\"target\":\"https://www.newlandingpage.com\",\"regions\":[\"us_east\",\"eu_west\"],\"enabled\":true}' \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}\""}]}},"/v2/uptime/checks/{check_id}/alerts":{"get":{"description":"To list all of the alerts for an Uptime check, send a GET request to `/v2/uptime/checks/$CHECK_ID/alerts`.","operationId":"uptime_check_alerts_list","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"alerts":{"items":{"allOf":[{"properties":{"id":{"description":"A unique ID that can be used to identify and reference the alert.","example":"5a4981aa-9653-4bd1-bef5-d6bff52042e4","format":"uuid","readOnly":true,"type":"string"}},"type":"object"},{"properties":{"comparison":{"description":"The comparison operator used against the alert's threshold.","enum":["greater_than","less_than"],"example":"greater_than","type":"string"},"name":{"description":"A human-friendly display name.","example":"Landing page degraded performance","type":"string"},"notifications":{"description":"The notification settings for a trigger alert.","properties":{"email":{"description":"An email to notify on an alert trigger.","example":["bob@example.com"],"items":{"type":"string"},"type":"array"},"slack":{"description":"Slack integration details.","items":{"properties":{"channel":{"description":"Slack channel to notify of an alert trigger.","example":"Production Alerts","format":"string","type":"string"},"url":{"description":"Slack Webhook URL.","example":"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ","format":"string","type":"string"}},"required":["url","channel"],"type":"object"},"type":"array"}},"required":["slack","email"],"type":"object"},"period":{"description":"Period of time the threshold must be exceeded to trigger the alert.","enum":["2m","3m","5m","10m","15m","30m","1h"],"example":"2m","type":"string"},"threshold":{"description":"The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.","example":300,"type":"integer"},"type":{"description":"The type of alert.","enum":["latency","down","down_global","ssl_expiry"],"example":"latency","type":"string"}},"type":"object"}],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"The response will be a JSON object with a key called `alerts`. This will be set to an array of objects, each of which will contain the standard attributes associated with an uptime alert.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Alerts","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/alerts\""}]},"post":{"description":"To create an Uptime alert, send a POST request to `/v2/uptime/checks/$CHECK_ID/alerts` specifying the attributes\nin the table below in the JSON body.\n","operationId":"uptime_alert_create","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts/get/responses/200/content/application~1json/schema/allOf/0/properties/alerts/items"}],"required":["name","type","notifications"],"type":"object"}}},"description":"The ''type'' field dictates the type of alert, and hence what type of value to pass into the threshold property.\nType | Description | Threshold Value\n-----|-------------|--------------------\n`latency` | alerts on the response latency | milliseconds\n`down` | alerts on a target registering as down in any region | N/A (Not required)\n`down_global` | alerts on a target registering as down globally | N/A (Not required)\n`ssl_expiry` | alerts on a SSL certificate expiring within $threshold days | days\n","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"alert":{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts/get/responses/200/content/application~1json/schema/allOf/0/properties/alerts/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `alert`. The value of this will be an object that contains the standard attributes associated with an uptime alert.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Alert","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"Landing page degraded performance\",\"type\":\"latency\",\"threshold\":300,\"comparison\":\"greater_than\",\"notifications\":{\"email\":[\"bob@example.com\"],\"slack\":[{\"channel\":\"Production Alerts\",\"url\":\"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ\"}]},\"period\":\"2m\"}' \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/alerts\""}]}},"/v2/uptime/checks/{check_id}/alerts/{alert_id}":{"delete":{"description":"To delete an Uptime alert, send a DELETE request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`. A 204 status\ncode with no body will be returned in response to a successful request.\n","operationId":"uptime_alert_delete","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts~1%7Balert_id%7D/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete an Alert","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/alerts/{alert_id}\""}]},"get":{"description":"To show information about an existing alert, send a GET request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`.","operationId":"uptime_alert_get","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"},{"description":"A unique identifier for an alert.","example":"17f0f0ae-b7e5-4ef6-86e3-aa569db58284","in":"path","name":"alert_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Alert","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/alerts/{alert_id}\""}]},"put":{"description":"To update the settings of an Uptime alert, send a PUT request to `/v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID`.\n","operationId":"uptime_alert_update","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts~1%7Balert_id%7D/get/parameters/1"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts/get/responses/200/content/application~1json/schema/allOf/0/properties/alerts/items/allOf/1"}],"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1alerts/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update an Alert","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"Landing page down globally\",\"type\":\"down_global\",\"notifications\":{\"email\":[\"bob@example.com\"],\"slack\":[{\"channel\":\"Production Alerts\",\"url\":\"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ\"}]},\"period\":\"2m\"}' \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/alerts/{alert_id}\""}]}},"/v2/uptime/checks/{check_id}/state":{"get":{"description":"To show information about an existing check's state, send a GET request to `/v2/uptime/checks/$CHECK_ID/state`.","operationId":"uptime_check_state_get","parameters":[{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"state":{"properties":{"previous_outage":{"properties":{"duration_seconds":{"example":120,"type":"integer"},"ended_at":{"example":"2025-08-15T13:52:28.146Z","type":"string"},"region":{"example":"us_east","type":"string"},"started_at":{"example":"2025-08-15T13:52:28.146Z","type":"string"}},"type":"object"},"regions":{"description":"A map of region to regional state","properties":{"eu_west":{"$ref":"#/paths/~1v2~1uptime~1checks~1%7Bcheck_id%7D~1state/get/responses/200/content/application~1json/schema/properties/state/properties/regions/properties/us_east"},"us_east":{"properties":{"status":{"enum":["DOWN","UP","CHECKING"],"example":"UP","type":"string"},"status_changed_at":{"example":"2025-08-15T13:52:28.146Z","type":"string"},"thirty_day_uptime_percentage":{"example":97.99,"type":"number"}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `state`. The value of this will be an object that contains the standard attributes associated with an uptime check's state.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve Check State","tags":["Uptime"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/uptime/checks/{check_id}/state\""}]}},"/v2/volumes":{"delete":{"description":"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&region=nyc1`.\nNo 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.\n\n","operationId":"volumes_delete_byName","parameters":[{"$ref":"#/paths/~1v2~1volumes/get/parameters/0"},{"$ref":"#/paths/~1v2~1volumes/get/parameters/1"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Block Storage Volume by Name","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes?name=example&region=nyc1\" "}]},"get":{"description":"To list all of the block storage volumes available on your account, send a GET request to `/v2/volumes`.\n## Filtering Results\n### By Region\nThe `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`\n### By Name\nIt 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`.\n**Note:** You can only create one volume per region with the same name.\n### By Name and Region\nIt 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&region=nyc1`.\n\n\n","operationId":"volumes_list","parameters":[{"description":"The block storage volume's name.","example":"example","in":"query","name":"name","schema":{"type":"string"}},{"description":"The slug identifier for the region where the resource is available.","example":"nyc3","in":"query","name":"region","schema":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"examples":{"All Volumes":{"value":{"links":{},"meta":{"total":2},"volumes":[{"created_at":"2025-08-15T13:52:28.146Z","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":"2025-08-15T13:52:28.146Z","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"]}]}},"Filtered by Name":{"value":{"links":{},"meta":{"total":1},"volumes":[{"created_at":"2025-08-15T13:52:28.146Z","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"]}]}},"Filtered by Region":{"value":{"links":{},"meta":{"total":1},"volumes":[{"created_at":"2025-08-15T13:52:28.146Z","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"]}]}}},"schema":{"allOf":[{"properties":{"volumes":{"description":"Array of volumes.","items":{"allOf":[{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the block storage volume was created.","example":"2025-08-15T13:52:28.146Z","readOnly":true,"type":"string"},"description":{"description":"An optional free-form text field to describe a block storage volume.","example":"Block store for examples","type":"string"},"droplet_ids":{"description":"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.","example":[],"items":{"type":"integer"},"nullable":true,"readOnly":true,"type":"array"},"id":{"description":"The unique identifier for the block storage volume.","example":"506f78a4-e098-11e5-ad9f-000f53306ae1","readOnly":true,"type":"string"},"name":{"description":"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.","example":"example","type":"string"},"size_gigabytes":{"description":"The size of the block storage volume in GiB (1024^3).","example":10,"type":"integer"},"tags":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"}},"type":"object"},{"properties":{"filesystem_label":{"description":"The label currently applied to the filesystem.","example":"example","type":"string"},"filesystem_type":{"description":"The type of filesystem currently in-use on the volume.","example":"ext4","type":"string"},"region":{"allOf":[{"description":"The region that the block storage volume is located in. When setting a region, the value should be the slug identifier for the region. When you query a block storage volume, the entire region object will be returned."},{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items/properties/region"}],"example":{"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"},"readOnly":true}}}],"type":"object"},"type":"array"}},"required":["volumes"],"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}]}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Block Storage Volumes","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"# List all volumes\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes?region=nyc1\"\n\n# List volumes filtered by name\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes?name=example\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    volumes, _, err := client.Storage.ListVolumes(ctx, opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nvolumes = client.volumes.all\nvolumes.each"}]},"post":{"description":"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.","operationId":"volumes_create","requestBody":{"content":{"application/json":{"examples":{"Volume from a snapshot":{"value":{"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"}},"ext4 volume":{"value":{"description":"Block store for examples","filesystem_label":"ext4_volume_01","filesystem_type":"ext4","name":"ext4-example","region":"nyc1","size_gigabytes":10}},"xfs volume":{"value":{"description":"Block store for examples","filesystem_label":"xfs_volume01","filesystem_type":"xfs","name":"xfs_example","region":"nyc1","size_gigabytes":10}}},"schema":{"anyOf":[{"allOf":[{"$ref":"#/paths/~1v2~1volumes/get/responses/200/content/application~1json/schema/allOf/0/properties/volumes/items/allOf/0"},{"properties":{"snapshot_id":{"description":"The unique identifier for the volume snapshot from which to create the volume.","example":"b0798135-fb76-11eb-946a-0a58ac146f33","type":"string"}}},{"properties":{"filesystem_type":{"description":"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.","example":"ext4","type":"string"}},"type":"object"},{"properties":{"filesystem_label":{"allOf":[{"description":"The label applied to the filesystem. Labels for ext4 type filesystems may contain 16 characters while labels for xfs type filesystems are limited to 12 characters. May only be used in conjunction with filesystem_type.","example":"example","type":"string"},{"maxLength":16}]},"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},"required":["name","size_gigabytes","region"]}],"type":"object"},{"allOf":[{"$ref":"#/paths/~1v2~1volumes/get/responses/200/content/application~1json/schema/allOf/0/properties/volumes/items/allOf/0"},{"$ref":"#/paths/~1v2~1volumes/post/requestBody/content/application~1json/schema/anyOf/0/allOf/1"},{"$ref":"#/paths/~1v2~1volumes/post/requestBody/content/application~1json/schema/anyOf/0/allOf/2"},{"properties":{"filesystem_label":{"allOf":[{"$ref":"#/paths/~1v2~1volumes/post/requestBody/content/application~1json/schema/anyOf/0/allOf/3/properties/filesystem_label/allOf/0"},{"maxLength":12}]},"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"}},"required":["name","size_gigabytes","region"]}],"type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"example":{"volume":{"created_at":"2025-08-15T13:52:28.146Z","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}},"properties":{"volume":{"$ref":"#/paths/~1v2~1volumes/get/responses/200/content/application~1json/schema/allOf/0/properties/volumes/items"}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New Block Storage Volume","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"size_gigabytes\":10, \"name\": \"example\", \"description\": \"Block store for examples\", \"region\": \"nyc1\", \"filesystem_type\": \"ext4\", \"filesystem_label\": \"example\"}' \\\n  \"https://api.digitalocean.com/v2/volumes\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &VolumeCreateRequest{\n        Region:        \"nyc1\",\n        Name:          \"example\",\n        Description:   \"Block store for examples\",\n        SizeGigaBytes: 10,\n    }\n\n    volume, _, err := client.Storage.CreateVolume(ctx, createRequest)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nvolume = DropletKit::Volume.new(\n  size_gigabytes: 10,\n  name: 'Example',\n  description: 'Block store for examples',\n  region: 'nyc1'\n)\nclient.volumes.create(volume)"}]}},"/v2/volumes/actions":{"post":{"description":"To initiate an action on a block storage volume by Name, send a POST request to\n`~/v2/volumes/actions`. The body should contain the appropriate\nattributes for the respective action.\n\n## Attach a Block Storage Volume to a Droplet\n\n| Attribute   | Details                                                             |\n| ----------- | ------------------------------------------------------------------- |\n| type        | This must be `attach`                                               |\n| volume_name | The name of the block storage volume                                |\n| droplet_id  | Set to the Droplet's ID                                             |\n| region      | Set to the slug representing the region where the volume is located |\n\nEach volume may only be attached to a single Droplet. However, up to five\nvolumes may be attached to a Droplet at a time. Pre-formatted volumes will be\nautomatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS\nDroplets created on or after April 26, 2018 when attached. On older Droplets,\n[additional configuration](https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-digitalocean-block-storage-volumes-in-linux#mounting-the-filesystems)\nis required.\n\n## Remove a Block Storage Volume from a Droplet\n\n| Attribute   | Details                                                             |\n| ----------- | ------------------------------------------------------------------- |\n| type        | This must be `detach`                                               |\n| volume_name | The name of the block storage volume                                |\n| droplet_id  | Set to the Droplet's ID                                             |\n| region      | Set to the slug representing the region where the volume is located |\n","operationId":"volumeActions_post","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"requestBody":{"content":{"application/json":{"examples":{"VolumeActionAttach":{"value":{"droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"],"type":"attach","volume_name":"example"}},"VolumeActionDetach":{"value":{"droplet_id":11612190,"region":"nyc1","type":"detach","volume_name":"example"}}},"schema":{"anyOf":[{"allOf":[{"properties":{"region":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/regions/items"},"type":{"description":"The volume action to initiate.","enum":["attach","detach","resize"],"example":"attach","type":"string"}},"required":["type"],"type":"object"},{"properties":{"droplet_id":{"description":"The unique identifier for the Droplet the volume will be attached or detached from.","example":11612190,"type":"integer"},"tags":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"}},"required":["droplet_id"]}],"type":"object"},{"allOf":[{"$ref":"#/paths/~1v2~1volumes~1actions/post/requestBody/content/application~1json/schema/anyOf/0/allOf/0"},{"properties":{"droplet_id":{"$ref":"#/paths/~1v2~1volumes~1actions/post/requestBody/content/application~1json/schema/anyOf/0/allOf/1/properties/droplet_id"}},"required":["droplet_id"]}],"type":"object"}],"discriminator":{"mapping":{"attach":"models/volume_action_post_attach.yml","detach":"models/volume_action_post_detach.yml"},"propertyName":"type"}}}},"required":true},"responses":{"202":{"content":{"application/json":{"examples":{"VolumeActionDetachResponse":{"value":{"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":"2025-08-15T13:52:28.146Z","status":"in-progress","type":"detach_volume"}}},"volume_action_attach_response":{"value":{"action":{"completed_at":"2025-08-15T13:52:28.146Z","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":"2025-08-15T13:52:28.146Z","status":"completed","type":"attach_volume"}}}},"schema":{"properties":{"action":{"allOf":[{"properties":{"resource_id":{"example":null,"nullable":true,"type":"integer"},"type":{"description":"This is the type of action that the object represents. For example, this could be \"attach_volume\" to represent the state of a volume attach action.","example":"attach_volume","type":"string"}}},{"$ref":"#/paths/~1v2~1actions/get/responses/200/content/application~1json/schema/allOf/0/properties/actions/items"}],"type":"object"}}}}},"description":"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","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate A Block Storage Action By Volume Name","tags":["Block Storage Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Attach a volume to a Droplet by name\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\": \"attach\", \"volume_name\": \"example\", \"region\": \"nyc1\", \"droplet_id\": \"11612190\",\"tags\":[\"aninterestingtag\"] }' \\\n  \"https://api.digitalocean.com/v2/volumes/actions\"\n\n# Remove a volume from a Droplet by name\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\": \"detach\", \"droplet_id\": \"11612190\", \"volume_name\": \"example\", \"region\": \"nyc1\"}' \\\n  \"https://api.digitalocean.com/v2/volumes/actions\""}]}},"/v2/volumes/snapshots/{snapshot_id}":{"delete":{"description":"To delete a volume snapshot, send a DELETE request to\n`/v2/snapshots/$SNAPSHOT_ID`.\n\nA status of 204 will be given. This indicates that the request was processed\nsuccessfully, but that no response body is needed.\n","operationId":"volumeSnapshots_delete_byId","parameters":[{"$ref":"#/paths/~1v2~1snapshots~1%7Bsnapshot_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Volume Snapshot","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Storage.DeleteSnapshot(ctx, \"82a48a18-873f-11e6-96bf-000f53315a41\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.snapshots.delete(id: \"fbe805e8-866b-11e6-96bf-000f53315a41\")"}]},"get":{"description":"To retrieve the details of a snapshot that has been created from a volume, send a GET request to `/v2/volumes/snapshots/$SNAPSHOT_ID`.\n\n","operationId":"volumeSnapshots_get_byId","parameters":[{"$ref":"#/paths/~1v2~1snapshots~1%7Bsnapshot_id%7D/get/parameters/0"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"snapshot":{"created_at":"2025-08-15T13:52:28.146Z","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"]}},"properties":{"snapshot":{"$ref":"#/paths/~1v2~1snapshots/get/responses/200/content/application~1json/schema/allOf/0/properties/snapshots/items"}}}}},"description":"You will get back a JSON object that has a `snapshot` key. This will contain the standard snapshot attributes","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Volume Snapshot","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41\""}]}},"/v2/volumes/{volume_id}":{"delete":{"description":"To delete a block storage volume, destroying all data and removing it from your account, send a DELETE request to `/v2/volumes/$VOLUME_ID`.\nNo 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.\n\n","operationId":"volumes_delete","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a Block Storage Volume","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    _, err := client.Storage.DeleteVolume(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.volumes.delete(id: '7724db7c-e098-11e5-b522-000f53304e51')"}]},"get":{"description":"To show information about a block storage volume, send a GET request to `/v2/volumes/$VOLUME_ID`.\n\n","operationId":"volumes_get","parameters":[{"description":"The ID of the block storage volume.","example":"7724db7c-e098-11e5-b522-000f53304e51","in":"path","name":"volume_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1volumes/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Block Storage Volume","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"# Retrieve an existing volume\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51\"\n\n# Retrieve and existing volume by name\ncurl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes?name=example&region=nyc1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    volume, _, err := client.Storage.GetVolume(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.volumes.find(id: '7724db7c-e098-11e5-b522-000f53304e51')"}]}},"/v2/volumes/{volume_id}/actions":{"get":{"description":"To retrieve all actions that have been executed on a volume, send a GET request to `/v2/volumes/$VOLUME_ID/actions`.\n\n","operationId":"volumeActions_list","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions":{"items":{"$ref":"#/paths/~1v2~1volumes~1actions/post/responses/202/content/application~1json/schema/properties/action"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"actions":[{"completed_at":"2025-08-15T13:52:28.147Z","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":"2025-08-15T13:52:28.147Z","status":"completed","type":"attach_volume"}],"links":{},"meta":{"total":1}}}}},"description":"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.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All Actions for a Volume","tags":["Block Storage Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    actions, _, err := client.StorageActions(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\", opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nactions = client.volume.actions(id: '7724db7c-e098-11e5-b522-000f53304e51')\nactions.each"}]},"post":{"description":"To initiate an action on a block storage volume by Id, send a POST request to\n`~/v2/volumes/$VOLUME_ID/actions`. The body should contain the appropriate\nattributes for the respective action.\n\n## Attach a Block Storage Volume to a Droplet\n\n| Attribute  | Details                                                             |\n| ---------- | ------------------------------------------------------------------- |\n| type       | This must be `attach`                                               |\n| droplet_id | Set to the Droplet's ID                                             |\n| region     | Set to the slug representing the region where the volume is located |\n\nEach volume may only be attached to a single Droplet. However, up to seven\nvolumes may be attached to a Droplet at a time. Pre-formatted volumes will be\nautomatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS\nDroplets created on or after April 26, 2018 when attached. On older Droplets,\n[additional configuration](https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-digitalocean-block-storage-volumes-in-linux#mounting-the-filesystems)\nis required.\n\n## Remove a Block Storage Volume from a Droplet\n\n| Attribute  | Details                                                             |\n| ---------- | ------------------------------------------------------------------- |\n| type       | This must be `detach`                                               |\n| droplet_id | Set to the Droplet's ID                                             |\n| region     | Set to the slug representing the region where the volume is located |\n\n## Resize a Volume\n\n| Attribute      | Details                                                             |\n| -------------- | ------------------------------------------------------------------- |\n| type           | This must be `resize`                                               |\n| size_gigabytes | The new size of the block storage volume in GiB (1024^3)            |\n| region         | Set to the slug representing the region where the volume is located |\n\nVolumes may only be resized upwards. The maximum size for a volume is 16TiB.\n","operationId":"volumeActions_post_byId","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"requestBody":{"content":{"application/json":{"examples":{"VolumeActionAttach":{"value":{"droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"],"type":"attach"}},"VolumeActionDetach":{"value":{"droplet_id":11612190,"region":"nyc1","type":"detach"}},"VolumeActionResize":{"value":{"region":"nyc1","size_gigabytes":100,"type":"resize"}}},"schema":{"anyOf":[{"$ref":"#/paths/~1v2~1volumes~1actions/post/requestBody/content/application~1json/schema/anyOf/0"},{"$ref":"#/paths/~1v2~1volumes~1actions/post/requestBody/content/application~1json/schema/anyOf/1"},{"allOf":[{"$ref":"#/paths/~1v2~1volumes~1actions/post/requestBody/content/application~1json/schema/anyOf/0/allOf/0"},{"properties":{"size_gigabytes":{"description":"The new size of the block storage volume in GiB (1024^3).","maximum":16384,"type":"integer"}},"required":["size_gigabytes"]}],"type":"object"}],"discriminator":{"mapping":{"attach":"models/volume_action_post_attach.yml","detach":"models/volume_action_post_detach.yml","resize":"models/volume_action_post_resize.yml"},"propertyName":"type"}}}},"required":true},"responses":{"202":{"$ref":"#/paths/~1v2~1volumes~1actions/post/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Initiate A Block Storage Action By Volume Id","tags":["Block Storage Actions"],"x-codeSamples":[{"lang":"cURL","source":"# Attach a Volume to a Droplet by ID\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\": \"attach\", \"droplet_id\": 11612190, \"region\": \"nyc1\", \"tags\":[\"aninterestingtag\"]}' \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions\"\n\n# Remove a Volume from a Droplet by ID\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\": \"detach\", \"droplet_id\": \"11612190\", \"region\": \"nyc1\"}' \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions\"\n\n# Resize a Volume\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"type\":\"resize\",\"size_gigabytes\": 100, \"region\":\"nyc1\"}' \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n  // Attach a Volume to a Droplet by ID\n    action, _, err := client.StorageActions.Attach(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\", 11612190)\n\n  // Remove a Volume from a Droplet by ID\n  // action, _, err := client.StorageActions.Detach(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\")\n\n  // Resize a Volume\n  // action, _, err := client.StorageActions.Resize(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\", 100, \"nyc1\")\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\n# Attach a Volume to a Droplet by ID\nclient.volume_actions.attach(volume_id:'7724db7c-e098-11e5-b522-000f53304e51', droplet_id: 11612190, region: 'nyc1'\n\n\n# Remove a Volume from a Droplet by ID\n# client.volume_actions.detach(volume_id:'7724db7c-e098-11e5-b522-000f53304e51', droplet_id: 11612190, region: 'nyc1'"}]}},"/v2/volumes/{volume_id}/actions/{action_id}":{"get":{"description":"To retrieve the status of a volume action, send a GET request to `/v2/volumes/$VOLUME_ID/actions/$ACTION_ID`.\n\n","operationId":"volumeActions_get","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1actions~1%7Baction_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"$ref":"#/paths/~1v2~1volumes~1actions/post/responses/202"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing Volume Action","tags":["Block Storage Actions"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions/72531856\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    action, _, err := client.StorageActions.Get(ctx, \"7724db7c-e098-11e5-b522-000f53304e51\", 72531856)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.volume.actions.find(volume_id: '7724db7c-e098-11e5-b522-000f53304e51', id: 72531856)"}]}},"/v2/volumes/{volume_id}/snapshots":{"get":{"description":"To retrieve the snapshots that have been created from a volume, send a GET request to `/v2/volumes/$VOLUME_ID/snapshots`.\n\n","operationId":"volumeSnapshots_list","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"snapshots":{"items":{"$ref":"#/paths/~1v2~1snapshots/get/responses/200/content/application~1json/schema/allOf/0/properties/snapshots/items"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{},"meta":{"total":1},"snapshots":[{"created_at":"2025-08-15T13:52:28.147Z","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}]}}}},"description":"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","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List Snapshots for a Volume","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/volumes/82a48a18-873f-11e6-96bf-000f53315a41/snapshots?page=1&per_page=1\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opt := &godo.ListOptions{\n        Page:    1,\n        PerPage: 200,\n    }\n\n    volumes, _, err := client.Storage.ListSnapshots(ctx, '82a48a18-873f-11e6-96bf-000f53315a41', opt)\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nsnapshots = client.volumes.snapshots(id: '82a48a18-873f-11e6-96bf-000f53315a41')\nsnapshots.each"}]},"post":{"description":"To create a snapshot from a volume, sent a POST request to `/v2/volumes/$VOLUME_ID/snapshots`.","operationId":"volumeSnapshots_create","parameters":[{"$ref":"#/paths/~1v2~1volumes~1%7Bvolume_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"example":{"name":"big-data-snapshot1475261774"},"schema":{"properties":{"name":{"description":"A human-readable name for the volume snapshot.","example":"big-data-snapshot1475261774","type":"string"},"tags":{"$ref":"#/paths/~1v2~1droplets/get/responses/200/content/application~1json/schema/allOf/0/properties/droplets/items/properties/image/properties/tags"}},"required":["name"]}}},"required":true},"responses":{"201":{"$ref":"#/paths/~1v2~1volumes~1snapshots~1%7Bsnapshot_id%7D/get/responses/200"},"400":{"$ref":"#/paths/~1v2~1firewalls/post/responses/400"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create Snapshot from a Volume","tags":["Block Storage"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H 'Content-Type: application/json' \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"big-data-snapshot1475261774\", \"tags\":[\"aninterestingtag\"]}' \\\n  \"https://api.digitalocean.com/v2/volumes/82a48a18-873f-11e6-96bf-000f53315a41/snapshots\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    snapshot, _, err := client.Storage.CreateSnapshot(ctx, &godo.SnapshotCreateRequest{\n      VolumeID:    \"82a48a18-873f-11e6-96bf-000f53315a41\",\n      Name:        \"my snapshot\",\n      Description: \"my description\",\n      Tags:        []string{\"one\", \"two\"},\n    })\n}"},{"lang":"Ruby","source":"require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nclient.volumes.create_snapshot(id: \"82a48a18-873f-11e6-96bf-000f53315a41\", name: \"big-data-snapshot1475261774\")"}]}},"/v2/vpcs":{"get":{"description":"To list all of the VPCs on your account, send a GET request to `/v2/vpcs`.","operationId":"vpcs_list","parameters":[{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"vpcs":{"items":{"allOf":[{"properties":{"description":{"description":"A free-form text field for describing the VPC's purpose. It may be a maximum of 255 characters.","example":"VPC for production environment","maxLength":255,"type":"string"},"name":{"description":"The name of the VPC. Must be unique and may only contain alphanumeric characters, dashes, and periods.","example":"env.prod-vpc","pattern":"^[a-zA-Z0-9\\-\\.]+$","type":"string"}},"type":"object"},{"properties":{"ip_range":{"description":"The range of IP addresses in the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be smaller than `/28` nor larger than `/16`. If no IP range is specified, a `/20` network range is generated that won't conflict with other VPC networks in your account.","example":"10.10.10.0/24","type":"string"},"region":{"description":"The slug identifier for the region where the VPC will be created.","example":"nyc1","type":"string"}},"type":"object"},{"properties":{"default":{"description":"A boolean value indicating whether or not the VPC is the default network for the region. All applicable resources are placed into the default VPC network unless otherwise specified during their creation. The `default` field cannot be unset from `true`. If you want to set a new default VPC network, update the `default` field of another VPC network in the same region. The previous network's `default` field will be set to `false` when a new default VPC has been defined.","example":true,"type":"boolean"}},"type":"object"},{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format.","example":"2025-08-15T13:52:28.147Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"A unique ID that can be used to identify and reference the VPC.","example":"5a4981aa-9653-4bd1-bef5-d6bff52042e4","format":"uuid","readOnly":true,"type":"string"},"urn":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/get/responses/200/content/application~1json/schema/allOf/0/properties/resources/items/properties/urn"}},"type":"object"}],"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{},"meta":{"total":3},"vpcs":[{"created_at":"2025-08-15T13:52:28.147Z","default":false,"description":"VPC for production environment","id":"5a4981aa-9653-4bd1-bef5-d6bff52042e4","ip_range":"10.10.10.0/24","name":"env.prod-vpc","region":"nyc1","urn":"do:vpc:5a4981aa-9653-4bd1-bef5-d6bff52042e4"},{"created_at":"2025-08-15T13:52:28.147Z","default":true,"description":"","id":"e0fe0f4d-596a-465e-a902-571ce57b79fa","ip_range":"10.102.0.0/20","name":"default-nyc1","region":"nyc1","urn":"do:vpc:e0fe0f4d-596a-465e-a902-571ce57b79fa"},{"created_at":"2025-08-15T13:52:28.147Z","default":true,"description":"","id":"d455e75d-4858-4eec-8c95-da2f0a5f93a7","ip_range":"10.100.0.0/20","name":"default-nyc3","region":"nyc3","urn":"do:vpc:d455e75d-4858-4eec-8c95-da2f0a5f93a7"}]}}}},"description":"The response will be a JSON object with a key called `vpcs`. This will be set to an array of objects, each of which will contain the standard attributes associated with a VPC","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List All VPCs","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/vpcs\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    opts := &godo.ListOptions{\n     Page:    1,\n     PerPage: 200,\n    }\n\n    vpcs, _, err := client.VPCs.List(ctx, opts)\n}"}]},"post":{"description":"To create a VPC, send a POST request to `/v2/vpcs` specifying the attributes\nin the table below in the JSON body.\n\n**Note:** If you do not currently have a VPC network in a specific datacenter\nregion, the first one that you create will be set as the default for that\nregion. The default VPC for a region cannot be changed or deleted.\n","operationId":"vpcs_create","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/0"},{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/1"}],"required":["name","region"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"vpc":{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items"}},"type":"object"}}},"description":"The response will be a JSON object with a key called `vpc`. The value of this will be an object that contains the standard attributes associated with a VPC.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Create a New VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"my-new-vpc\", \"region\":\"nyc1\", \"ip_range\": \"10.10.10.0/24\"}' \\\n  \"https://api.digitalocean.com/v2/vpcs\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    createRequest := &godo.VPCCreateRequest{\n     Name:       \"my-new-vpc\",\n     RegionSlug: \"nyc1\",\n     IPRange:    \"10.10.10.0/24\",\n    }\n\n    vpc, _, err := client.VPCs.Create(ctx, createRequest)\n}"}]}},"/v2/vpcs/{vpc_id}":{"delete":{"description":"To delete a VPC, send a DELETE request to `/v2/vpcs/$VPC_ID`. A 204 status\ncode with no body will be returned in response to a successful request.\n\nThe default VPC for a region can not be deleted. Additionally, a VPC can only\nbe deleted if it does not contain any member resources. Attempting to delete\na region's default VPC or a VPC that still has members will result in a\n403 Forbidden error response.\n","operationId":"vpcs_delete","parameters":[{"$ref":"#/paths/~1v2~1vpcs~1%7Bvpc_id%7D/get/parameters/0"}],"responses":{"204":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/delete/responses/204"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Delete a VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X DELETE \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/vpcs/e0fe0f4d-596a-465e-a902-571ce57b79fa\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    resp, err := client.VPCs.Delete(ctx, \"5a4981aa-9653-4bd1-bef5-d6bff52042e4\")\n}"}]},"get":{"description":"To show information about an existing VPC, send a GET request to `/v2/vpcs/$VPC_ID`.","operationId":"vpcs_get","parameters":[{"description":"A unique identifier for a VPC.","example":"4de7ac8b-495b-4884-9a69-1050c6793cd6","in":"path","name":"vpc_id","required":true,"schema":{"format":"uuid","minimum":1,"type":"string"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1vpcs/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Retrieve an Existing VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/vpcs/5a4981aa-9653-4bd1-bef5-d6bff52042e4\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    vpc, _, err := client.VPCs.Get(ctx, \"5a4981aa-9653-4bd1-bef5-d6bff52042e4\")\n}"}]},"patch":{"description":"To update a subset of information about a VPC, send a PATCH request to\n`/v2/vpcs/$VPC_ID`.\n","operationId":"vpcs_patch","parameters":[{"$ref":"#/paths/~1v2~1vpcs~1%7Bvpc_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/0"},{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/2"}]}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1vpcs/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Partially Update a VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"description\": \"An updated description\"}' \\\n  \"https://api.digitalocean.com/v2/vpcs/5a4981aa-9653-4bd1-bef5-d6bff52042e4\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    vpcDesc := \"An updated description\"\n    _, _, err := client.VPCs.Set(ctx, \"5a4981aa-9653-4bd1-bef5-d6bff52042e4\", godo.VPCSetDescription(vpcDesc))\n}"}]},"put":{"description":"To update information about a VPC, send a PUT request to `/v2/vpcs/$VPC_ID`.\n","operationId":"vpcs_update","parameters":[{"$ref":"#/paths/~1v2~1vpcs~1%7Bvpc_id%7D/get/parameters/0"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/0"},{"$ref":"#/paths/~1v2~1vpcs/get/responses/200/content/application~1json/schema/allOf/0/properties/vpcs/items/allOf/2"}],"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"$ref":"#/paths/~1v2~1vpcs/post/responses/201"},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"Update a VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X PUT \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  -d '{\"name\":\"renamed-new-vpc\", \"description\": \"A new description\", \"default\": true}' \\\n  \"https://api.digitalocean.com/v2/vpcs/5a4981aa-9653-4bd1-bef5-d6bff52042e4\""},{"lang":"Go","source":"import (\n    \"context\"\n    \"os\"\n\n    \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n    token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n    client := godo.NewFromToken(token)\n    ctx := context.TODO()\n\n    updateRequest := &godo.VPCUpdateRequest{\n     Name:        \"renamed-new-vpc\",\n     Description: \"A new description\",\n    }\n\n    _, _, err := client.VPCs.Update(ctx, \"5a4981aa-9653-4bd1-bef5-d6bff52042e4\", updateRequest)\n}"}]}},"/v2/vpcs/{vpc_id}/members":{"get":{"description":"To list all of the resources that are members of a VPC, send a GET request to\n`/v2/vpcs/$VPC_ID/members`.\n\nTo only list resources of a specific type that are members of the VPC,\nincluded a `resource_type` query parameter. For example, to only list Droplets\nin the VPC, send a GET request to `/v2/vpcs/$VPC_ID/members?resource_type=droplet`.\n","operationId":"vpcs_list_members","parameters":[{"$ref":"#/paths/~1v2~1vpcs~1%7Bvpc_id%7D/get/parameters/0"},{"description":"Used to filter VPC members by a resource type.","example":"droplet","in":"query","name":"resource_type","required":false,"schema":{"type":"string"}},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/0"},{"$ref":"#/paths/~1v2~1account~1keys/get/parameters/1"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"members":{"items":{"properties":{"created_at":{"description":"A time value given in ISO8601 combined date and time format that represents when the resource was created.","example":"2025-08-15T13:52:28.147Z","type":"string"},"name":{"description":"The name of the resource.","example":"nyc1-load-balancer-01","type":"string"},"urn":{"$ref":"#/paths/~1v2~1projects~1%7Bproject_id%7D~1resources/get/responses/200/content/application~1json/schema/allOf/0/properties/resources/items/properties/urn"}},"type":"object"},"type":"array"}},"type":"object"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/1"},{"$ref":"#/paths/~1v2~1account~1keys/get/responses/200/content/application~1json/schema/allOf/2"}],"example":{"links":{},"members":[{"created_at":"2025-08-15T13:52:28.147Z","name":"nyc1-load-balancer-01","urn":"do:loadbalancer:fb294d78-d193-4cb2-8737-ea620993591b"},{"created_at":"2025-08-15T13:52:28.147Z","name":"db-postgresql-nyc1-55986","urn":"do:dbaas:13f7a2f6-43df-4c4a-8129-8733267ddeea"},{"created_at":"2025-08-15T13:52:28.147Z","name":"k8s-nyc1-1584127772221","urn":"do:kubernetes:da39d893-96e1-4e4d-971d-1fdda33a46b1"},{"created_at":"2025-08-15T13:52:28.147Z","name":"ubuntu-s-1vcpu-1gb-nyc1-01","urn":"do:droplet:86e29982-03a7-4946-8a07-a0114dff8754"}],"meta":{"total":4}}}}},"description":"The response will be a JSON object with a key called members. This will be set to an array of objects, each of which will contain the standard attributes associated with a VPC member.","headers":{"ratelimit-limit":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-limit"},"ratelimit-remaining":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-remaining"},"ratelimit-reset":{"$ref":"#/paths/~1v2~11-clicks/get/responses/200/headers/ratelimit-reset"}}},"401":{"$ref":"#/paths/~1v2~11-clicks/get/responses/401"},"404":{"$ref":"#/paths/~1v2~1account~1keys~1%7Bssh_key_identifier%7D/get/responses/404"},"429":{"$ref":"#/paths/~1v2~11-clicks/get/responses/429"},"500":{"$ref":"#/paths/~1v2~11-clicks/get/responses/500"},"default":{"$ref":"#/paths/~1v2~11-clicks/get/responses/default"}},"security":[{"bearer_auth":[]}],"summary":"List the Member Resources of a VPC","tags":["VPCs"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n  \"https://api.digitalocean.com/v2/vpcs/5a4981aa-9653-4bd1-bef5-d6bff52042e4/members\""}]}}},"components":{"securitySchemes":{"bearer_auth":{"description":"## OAuth Authentication\n\nIn order to interact with the DigitalOcean API, you or your application must\nauthenticate.\n\nThe DigitalOcean API handles this through OAuth, an open standard for\nauthorization. OAuth allows you to delegate access to your account in full\nor in read-only mode.\n\nYou can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)\nsection of the DigitalOcean control panel for your account.\n\nAn OAuth token functions as a complete authentication request. In effect, it\nacts as a substitute for a username and password pair.\n\nBecause of this, it is absolutely **essential** that you keep your OAuth\ntokens secure. In fact, upon generation, the web interface will only display\neach token a single time in order to prevent the token from being compromised.\n\nDigitalOcean access tokens begin with an identifiable prefix in order to\ndistinguish them from other similar tokens.\n\n- `dop_v1_` for personal access tokens generated in the control panel\n- `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)\n- `dor_v1_` for OAuth refresh tokens\n\n### How to Authenticate with OAuth\n\nIn order to make an authenticated request, include a bearer-type\n`Authorization` header containing your OAuth token. All requests must be\nmade over HTTPS.\n\n### Authenticate with a Bearer Authorization Header\n\n```\ncurl -X $HTTP_METHOD -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \"https://api.digitalocean.com/v2/$OBJECT\"\n```\n","scheme":"bearer","type":"http"}}}}