openapi: 3.0.0 info: title: DigitalOcean Monitoring API version: '2.0' 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 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```json\n {\n \"droplet\": {\n \"name\": \"example.com\"\n . . .\n }\n }\n```\n\n### Response for an Object Collection\n\n```json\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```json\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```json\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\nMore rate limiting information is returned only within burst limit error response headers:\n* **retry-after**: The number of seconds to wait before making another request when rate limited.\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. \n\n`ratelimit-remaining` reaching zero can also indicate that the \"burst limit\" of 250 \nrequests per minute limit was met, even if the 5,000 requests per hour limit was not. \nIn this case, the 429 error response will include a `retry-after` header to indicate how \nlong to wait (in seconds) until the request may be retried.\n\nYou can see the format 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 Limit Headers When Burst Limit is Reached:\n\n```\n . . .\n ratelimit-limit: 5000\n ratelimit-remaining: 0\n rateLimit-reset: 1402425459\n retry-after: 29\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 contact: name: DigitalOcean API Team email: api-engineering@digitalocean.com termsOfService: https://www.digitalocean.com/legal/terms-of-service-agreement/ servers: - url: https://api.digitalocean.com description: production security: - bearer_auth: [] tags: - name: Monitoring description: 'The DigitalOcean Monitoring API makes it possible to programmatically retrieve metrics as well as configure alert policies based on these metrics. The Monitoring API can help you gain insight into how your apps are performing and consuming resources.' paths: /v2/monitoring/alerts: get: operationId: monitoring_list_alertPolicy summary: List Alert Policies 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`. tags: - Monitoring parameters: - $ref: '#/components/parameters/per_page' - $ref: '#/components/parameters/page' responses: '200': $ref: '#/components/responses/list_alert_policy_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.list_alert_policy()' security: - bearer_auth: - monitoring:read post: operationId: monitoring_create_alertPolicy summary: Create Alert Policy description: To create a new alert, send a POST request to `/v2/monitoring/alerts`. tags: - Monitoring responses: '200': $ref: '#/components/responses/alert_policy_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' requestBody: 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: Type | Description | Valid Entity Type -----|-------------|-------------------- `v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID `v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID `v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID `v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID `v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID `v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID `v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID `v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID `v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID `v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID `v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID `v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization (requires at least one HTTPS forwarding rule)|load balancer ID `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 `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 `v1/insights/lbaas/increase_in_http_error_rate_count_5xx`|alert on the count of 5xx level http errors over 5m|load balancer ID `v1/insights/lbaas/increase_in_http_error_rate_count_4xx`|alert on the count of 4xx level http errors over 5m|load balancer ID `v1/insights/lbaas/high_http_request_response_time`|alert on high average http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_50p`|alert on high 50th percentile http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_95p`|alert on high 95th percentile http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_99p`|alert on high 99th percentile http response time|load balancer ID `v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID `v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID `v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID `v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID ' required: true content: application/json: schema: $ref: '#/components/schemas/alert_policy_request' 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\"}'" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"alerts\": {\n \"email\": [\n \"bob@exmaple.com\"\n ],\n \"slack\": [\n {\n \"channel\": \"Production Alerts\",\n \"url\": \"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ\"\n }\n ]\n },\n \"compare\": \"GreaterThan\",\n \"description\": \"CPU Alert\",\n \"enabled\": True,\n \"entities\": [\n \"192018292\"\n ],\n \"tags\": [\n \"droplet_tag\"\n ],\n \"type\": \"v1/insights/droplet/cpu\",\n \"value\": 80,\n \"window\": \"5m\"\n}\n\nresp = client.monitoring.create_alert_policy(body=req)" security: - bearer_auth: - monitoring:create /v2/monitoring/alerts/{alert_uuid}: get: operationId: monitoring_get_alertPolicy summary: Retrieve an Existing Alert Policy description: To retrieve a given alert policy, send a GET request to `/v2/monitoring/alerts/{alert_uuid}` tags: - Monitoring responses: '200': $ref: '#/components/responses/alert_policy_response' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/alert_uuid' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_alert_policy(alert_uuid="dfa8da")' security: - bearer_auth: - monitoring:read put: operationId: monitoring_update_alertPolicy summary: Update an Alert Policy description: To update en existing policy, send a PUT request to `v2/monitoring/alerts/{alert_uuid}`. tags: - Monitoring responses: '200': $ref: '#/components/responses/alert_policy_response' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/alert_uuid' requestBody: 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: Type | Description | Valid Entity Type -----|-------------|-------------------- `v1/insights/droplet/memory_utilization_percent` | alert on the percent of memory utilization | Droplet ID `v1/insights/droplet/disk_read` | alert on the rate of disk read I/O in MBps | Droplet ID `v1/insights/droplet/load_5` | alert on the 5 minute load average | Droplet ID `v1/insights/droplet/load_15` | alert on the 15 minute load average | Droplet ID `v1/insights/droplet/disk_utilization_percent` | alert on the percent of disk utilization | Droplet ID `v1/insights/droplet/cpu` | alert on the percent of CPU utilization | Droplet ID `v1/insights/droplet/disk_write` | alert on the rate of disk write I/O in MBps | Droplet ID `v1/insights/droplet/public_outbound_bandwidth` | alert on the rate of public outbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/public_inbound_bandwidth` | alert on the rate of public inbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/private_outbound_bandwidth` | alert on the rate of private outbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/private_inbound_bandwidth` | alert on the rate of private inbound bandwidth in Mbps | Droplet ID `v1/insights/droplet/load_1` | alert on the 1 minute load average | Droplet ID `v1/insights/lbaas/avg_cpu_utilization_percent`|alert on the percent of CPU utilization|load balancer ID `v1/insights/lbaas/connection_utilization_percent`|alert on the percent of connection utilization|load balancer ID `v1/insights/lbaas/droplet_health`|alert on Droplet health status changes|load balancer ID `v1/insights/lbaas/tls_connections_per_second_utilization_percent`|alert on the percent of TLS connections per second utilization (requires at least one HTTPS forwarding rule)|load balancer ID `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 `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 `v1/insights/lbaas/increase_in_http_error_rate_count_5xx`|alert on the count of 5xx level http errors over 5m|load balancer ID `v1/insights/lbaas/increase_in_http_error_rate_count_4xx`|alert on the count of 4xx level http errors over 5m|load balancer ID `v1/insights/lbaas/high_http_request_response_time`|alert on high average http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_50p`|alert on high 50th percentile http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_95p`|alert on high 95th percentile http response time|load balancer ID `v1/insights/lbaas/high_http_request_response_time_99p`|alert on high 99th percentile http response time|load balancer ID `v1/dbaas/alerts/load_15_alerts` | alert on 15 minute load average across the database cluster | database cluster UUID `v1/dbaas/alerts/memory_utilization_alerts` | alert on the percent memory utilization average across the database cluster | database cluster UUID `v1/dbaas/alerts/disk_utilization_alerts` | alert on the percent disk utilization average across the database cluster | database cluster UUID `v1/dbaas/alerts/cpu_alerts` | alert on the percent CPU usage average across the database cluster | database cluster UUID ' required: true content: application/json: schema: $ref: '#/components/schemas/alert_policy_request' 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\"}'" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"alerts\": {\n \"email\": [\n \"bob@exmaple.com\"\n ],\n \"slack\": [\n {\n \"channel\": \"Production Alerts\",\n \"url\": \"https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ\"\n }\n ]\n },\n \"compare\": \"GreaterThan\",\n \"description\": \"CPU Alert\",\n \"enabled\": True,\n \"entities\": [\n \"192018292\"\n ],\n \"tags\": [\n \"droplet_tag\"\n ],\n \"type\": \"v1/insights/droplet/cpu\",\n \"value\": 80,\n \"window\": \"5m\"\n}\n\nresp = client.monitoring.update_alert_policy(alert_uuid=\"fda9da\", body=req)" security: - bearer_auth: - monitoring:update delete: operationId: monitoring_delete_alertPolicy summary: Delete an Alert Policy description: To delete an alert policy, send a DELETE request to `/v2/monitoring/alerts/{alert_uuid}` tags: - Monitoring responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/alert_uuid' 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}\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.delete_alert_policy(alert_uuid="dfa8da")' security: - bearer_auth: - monitoring:delete /v2/monitoring/metrics/droplet/bandwidth: get: operationId: monitoring_get_dropletBandwidthMetrics summary: Get Droplet Bandwidth Metrics 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. The metrics in the response body are in megabits per second (Mbps).' tags: - Monitoring responses: '200': $ref: '#/components/responses/droplet_bandwidth_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/network_interface' - $ref: '#/components/parameters/network_direction' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_bandwidth_metrics(alert_uuid="dfa8da", host_id="17209102", interface="private", direction="inbound", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/cpu: get: operationId: monitoring_get_DropletCpuMetrics summary: Get Droplet CPU Metrics description: To retrieve CPU metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/cpu`. tags: - Monitoring responses: '200': $ref: '#/components/responses/droplet_cpu_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_cpu_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/filesystem_free: get: operationId: monitoring_get_dropletFilesystemFreeMetrics summary: Get Droplet Filesystem Free Metrics description: To retrieve filesystem free metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_free`. tags: - Monitoring responses: '200': $ref: '#/components/responses/droplet_filesystem_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_filesystem_free_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/filesystem_size: get: operationId: monitoring_get_dropletFilesystemSizeMetrics summary: Get Droplet Filesystem Size Metrics description: To retrieve filesystem size metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/filesystem_size`. tags: - Monitoring responses: '200': $ref: '#/components/responses/droplet_filesystem_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_filesystem_size_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/load_1: get: operationId: monitoring_get_dropletLoad1Metrics summary: Get Droplet Load1 Metrics description: To retrieve 1 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_1`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_load1_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/load_5: get: operationId: monitoring_get_dropletLoad5Metrics summary: Get Droplet Load5 Metrics description: To retrieve 5 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_5`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_load5_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/load_15: get: operationId: monitoring_get_dropletLoad15Metrics summary: Get Droplet Load15 Metrics description: To retrieve 15 minute load average metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/load_15`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_load15_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/memory_cached: get: operationId: monitoring_get_dropletMemoryCachedMetrics summary: Get Droplet Cached Memory Metrics description: To retrieve cached memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_cached`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_memory_cached_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/memory_free: get: operationId: monitoring_get_dropletMemoryFreeMetrics summary: Get Droplet Free Memory Metrics description: To retrieve free memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_free`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_memory_free_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/memory_total: get: operationId: monitoring_get_dropletMemoryTotalMetrics summary: Get Droplet Total Memory Metrics description: To retrieve total memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_total`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_memory_total_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/droplet/memory_available: get: operationId: monitoring_get_dropletMemoryAvailableMetrics summary: Get Droplet Available Memory Metrics description: To retrieve available memory metrics for a given droplet, send a GET request to `/v2/monitoring/metrics/droplet/memory_available`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_droplet_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.monitoring.get_droplet_memory_available_metrics(host_id="17209102", start="1620683817", end="1620705417")' security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/apps/memory_percentage: get: operationId: monitoring_get_appMemoryPercentageMetrics summary: Get App Memory Percentage Metrics description: To retrieve memory percentage metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/memory_percentage`. tags: - Monitoring responses: '200': $ref: '#/components/responses/app_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_app_id' - $ref: '#/components/parameters/app_component' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/apps/memory_percentage?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&app_component=sample-application&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/apps/cpu_percentage: get: operationId: monitoring_get_appCPUPercentageMetrics summary: Get App CPU Percentage Metrics description: To retrieve cpu percentage metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/cpu_percentage`. tags: - Monitoring responses: '200': $ref: '#/components/responses/app_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_app_id' - $ref: '#/components/parameters/app_component' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/apps/cpu_percentage?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&app_component=sample-application&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/apps/restart_count: get: operationId: monitoring_get_appRestartCountMetrics.yml summary: Get App Restart Count Metrics description: To retrieve restart count metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/restart_count`. tags: - Monitoring responses: '200': $ref: '#/components/responses/app_metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_app_id' - $ref: '#/components/parameters/app_component' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/apps/restart_count?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&app_component=sample-application&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_connections_current: get: operationId: monitoring_get_lb_frontend_connections_current summary: Get Load Balancer Frontend Total Current Active Connections Metrics description: To retrieve frontend total current active connections for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_connections_current`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_connections_current?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_connections_limit: get: operationId: monitoring_get_lb_frontend_connections_limit summary: Get Load Balancer Frontend Max Connections Limit Metrics description: To retrieve frontend max connections limit for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_connections_limit`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_connections_limit?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_cpu_utilization: get: operationId: monitoring_get_lb_frontend_cpu_utilization summary: Get Load Balancer Frontend Average Percentage CPU Utilization Metrics description: To retrieve frontend average percentage CPU utilization for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_cpu_utilization`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_cpu_utilization?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_bytes: get: operationId: monitoring_get_lb_frontend_firewall_dropped_bytes summary: Get Load Balancer Frontend Firewall Dropped Bytes Metrics description: To retrieve firewall dropped bytes for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_bytes`. This is currently only supported for network load balancers. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_firewall_dropped_bytes?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_packets: get: operationId: monitoring_get_lb_frontend_firewall_dropped_packets summary: Get Load Balancer Frontend Firewall Dropped Packets Metrics description: To retrieve firewall dropped packets per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_packets`. This is currently only supported for network load balancers. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_firewall_dropped_packets?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_http_responses: get: operationId: monitoring_get_lb_frontend_http_responses summary: Get Load Balancer Frontend HTTP Rate Of Response Code Metrics description: To retrieve frontend HTTP rate of response code for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_http_responses`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_http_responses?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_http_requests_per_second: get: operationId: monitoring_get_lb_frontend_http_requests_per_second summary: Get Load Balancer Frontend HTTP Requests Metrics description: To retrieve frontend HTTP requests per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_http_requests_per_second`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_http_requests_per_second?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_network_throughput_http: get: operationId: monitoring_get_lb_frontend_network_throughput_http summary: Get Load Balancer Frontend HTTP Throughput Metrics description: To retrieve frontend HTTP throughput in bytes per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_network_throughput_http`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_network_throughput_http?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_network_throughput_udp: get: operationId: monitoring_get_lb_frontend_network_throughput_udp summary: Get Load Balancer Frontend UDP Throughput Metrics description: To retrieve frontend UDP throughput in bytes per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_network_throughput_udp`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_network_throughput_udp?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_network_throughput_tcp: get: operationId: monitoring_get_lb_frontend_network_throughput_tcp summary: Get Load Balancer Frontend TCP Throughput Metrics description: To retrieve frontend TCP throughput in bytes per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_network_throughput_tcp`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_network_throughput_tcp?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_nlb_tcp_network_throughput: get: operationId: monitoring_get_lb_frontend_nlb_tcp_network_throughput summary: Get Network Load Balancer Frontend TCP Throughput Metrics description: To retrieve frontend TCP throughput in bytes per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_nlb_tcp_network_throughput`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_nlb_tcp_network_throughput?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_nlb_udp_network_throughput: get: operationId: monitoring_get_lb_frontend_nlb_udp_network_throughput summary: Get Network Load Balancer Frontend UDP Throughput Metrics description: To retrieve frontend UDP throughput in bytes per second for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_nlb_udp_network_throughput`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_nlb_udp_network_throughput?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_tls_connections_current: get: operationId: monitoring_get_lb_frontend_tls_connections_current summary: Get Load Balancer Frontend Current TLS Connections Rate Metrics description: To retrieve frontend current TLS connections rate for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_tls_connections_current`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_tls_connections_current?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_tls_connections_limit: get: operationId: monitoring_get_lb_frontend_tls_connections_limit summary: Get Load Balancer Frontend Max TLS Connections Limit Metrics description: To retrieve frontend max TLS connections limit for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_tls_connections_limit`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_tls_connections_limit?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/frontend_tls_connections_exceeding_rate_limit: get: operationId: monitoring_get_lb_frontend_tls_connections_exceeding_rate_limit summary: Get Load Balancer Frontend Closed TLS Connections For Exceeded Rate Limit Metrics description: To retrieve frontend closed TLS connections for exceeded rate limit for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/frontend_tls_connections_exceeding_rate_limit`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/frontend_tls_connections_exceeding_rate_limit?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_avg: get: operationId: monitoring_get_lb_droplets_http_session_duration_avg summary: Get Load Balancer Droplets Average HTTP Session Duration Metrics description: To retrieve Droplets average HTTP session duration in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_session_duration_avg`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_session_duration_avg?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_50p: get: operationId: monitoring_get_lb_droplets_http_session_duration_50p summary: Get Load Balancer Droplets 50th Percentile HTTP Session Duration Metrics description: To retrieve Droplets 50th percentile HTTP session duration in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_session_duration_50p`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_session_duration_50p?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_95p: get: operationId: monitoring_get_lb_droplets_http_session_duration_95p summary: Get Load Balancer Droplets 95th Percentile HTTP Session Duration Metrics description: To retrieve Droplets 95th percentile HTTP session duration in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_session_duration_95p`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_session_duration_95p?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_response_time_avg: get: operationId: monitoring_get_lb_droplets_http_response_time_avg summary: Get Load Balancer Droplets Average HTTP Response Time Metrics description: To retrieve Droplets average HTTP response time in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_response_time_avg`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_response_time_avg?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_response_time_50p: get: operationId: monitoring_get_lb_droplets_http_response_time_50p summary: Get Load Balancer Droplets 50th Percentile HTTP Response Time Metrics description: To retrieve Droplets 50th percentile HTTP response time in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_response_time_50p`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_response_time_50p?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_response_time_95p: get: operationId: monitoring_get_lb_droplets_http_response_time_95p summary: Get Load Balancer Droplets 95th Percentile HTTP Response Time Metrics description: To retrieve Droplets 95th percentile HTTP response time in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_response_time_95p`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_response_time_95p?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_response_time_99p: get: operationId: monitoring_get_lb_droplets_http_response_time_99p summary: Get Load Balancer Droplets 99th Percentile HTTP Response Time Metrics description: To retrieve Droplets 99th percentile HTTP response time in seconds for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_response_time_99p`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_response_time_99p?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_queue_size: get: operationId: monitoring_get_lb_droplets_queue_size summary: Get Load Balancer Droplets Queue Size Metrics description: To retrieve Droplets queue size for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_queue_size`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_queue_size?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_http_responses: get: operationId: monitoring_get_lb_droplets_http_responses summary: Get Load Balancer Droplets HTTP Rate Of Response Code Metrics description: To retrieve Droplets HTTP rate of response code for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_http_responses`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_http_responses?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_connections: get: operationId: monitoring_get_lb_droplets_connections summary: Get Load Balancer Droplets Active Connections Metrics description: To retrieve Droplets active connections for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_connections`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_connections?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_health_checks: get: operationId: monitoring_get_lb_droplets_health_checks summary: Get Load Balancer Droplets Health Check Status Metrics description: To retrieve Droplets health check status for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_health_checks`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_health_checks?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/metrics/load_balancer/droplets_downtime: get: operationId: monitoring_get_lb_droplets_downtime summary: Get Load Balancer Droplets Downtime Status Metrics description: To retrieve Droplets downtime status for a given load balancer, send a GET request to `/v2/monitoring/metrics/load_balancer/droplets_downtime`. tags: - Monitoring responses: '200': $ref: '#/components/responses/metric_response' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' parameters: - $ref: '#/components/parameters/parameters_load_balancer_id' - $ref: '#/components/parameters/metric_timestamp_start' - $ref: '#/components/parameters/metric_timestamp_end' 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/load_balancer/droplets_downtime?lb_id=4de7ac8b-495b-4884-9a69-1050c6793cd6&start=1636051668&end=1636051668\"" security: - bearer_auth: - monitoring:read /v2/monitoring/sinks/destinations: post: operationId: monitoring_create_destination summary: Create Logging Destination description: To create a new destination, send a POST request to `/v2/monitoring/sinks/destinations`. tags: - Monitoring requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/destination_request' examples: Managed OpenSearch Cluster: value: name: managed_opensearch_cluster type: opensearch_dbaas config: endpoint: db-opensearch-nyc3-123456-do-user-123456-0.g.db.ondigitalocean.com cluster_uuid: 85148069-7e35-4999-80bd-6fa1637ca385 cluster_name: managed_dbaas_cluster index_name: logs retention_days: 14 External OpenSearch Cluster: value: name: external_opensearch type: opensearch_ext config: endpoint: example.com credentials: username: username password: password index_name: logs retention_days: 14 responses: '200': $ref: '#/components/responses/destination' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/destinations\" \\\n --data '{\"name\":\"cluster\", \"type\":\"opensearch_dbaas\", \"config\": {\"endpoint\": \"example.com\", \"credentials\": {\"username\": \"username\", \"password\": \"password\"}}}'" security: - bearer_auth: - monitoring:create get: operationId: monitoring_list_destinations summary: List Logging Destinations description: To list all logging destinations, send a GET request to `/v2/monitoring/sinks/destinations`. tags: - Monitoring responses: '200': $ref: '#/components/responses/monitoring_list_destinations' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/destinations\"" security: - bearer_auth: - monitoring:read /v2/monitoring/sinks/destinations/{destination_uuid}: get: operationId: monitoring_get_destination summary: Get Logging Destination description: To get the details of a destination, send a GET request to `/v2/monitoring/sinks/destinations/${destination_uuid}`. tags: - Monitoring parameters: - $ref: '#/components/parameters/destination_uuid' responses: '200': $ref: '#/components/responses/destination' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/destinations/01f30bfa-319a-4769-ba95-9d43971fb514\"" security: - bearer_auth: - monitoring:read post: operationId: monitoring_update_destination summary: Update Logging Destination description: To update the details of a destination, send a PATCH request to `/v2/monitoring/sinks/destinations/${destination_uuid}`. tags: - Monitoring parameters: - $ref: '#/components/parameters/destination_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/destination_request' x-codeSamples: - lang: cURL source: "curl -X PATCH \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/monitoring/sinks/destinations/01f30bfa-319a-4769-ba95-9d43971fb514\" \\\n --data '{\"index_name\": \"logs\", \"retention_days\": 30}'" security: - bearer_auth: - monitoring:update delete: operationId: monitoring_delete_destination summary: Delete Logging Destination description: To delete a destination and all associated sinks, send a DELETE request to `/v2/monitoring/sinks/destinations/${destination_uuid}`. tags: - Monitoring parameters: - $ref: '#/components/parameters/destination_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/destinations/01f30bfa-319a-4769-ba95-9d43971fb514\"" security: - bearer_auth: - monitoring:delete /v2/monitoring/sinks: post: operationId: monitoring_create_sink summary: Create Sink description: "To create a new sink, send a POST request to `/v2/monitoring/sinks`. Forwards logs from the \nresources identified in `resources` to the specified pre-existing destination.\n" tags: - Monitoring responses: '202': $ref: '#/components/responses/accepted' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' requestBody: required: true content: application/json: schema: properties: destination_uuid: type: string example: 9df2b7e9-3fb2-4577-b60a-e9c0d53f9a99 description: A unique identifier for an already-existing destination. resources: type: array description: List of resources identified by their URNs. items: $ref: '#/components/schemas/sink_resource' 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/sinks\" \\\n --data '{\"destination_uuid\": \"f2fcd5d9-f410-4f3a-8015-130ada94b1fe\", \"resources\": [{\"name\": \"fra_kubernetes_cluster\", \"urn\":\"do:kubernetes:8463c9db-150c-4b44-830c-fca7f68d005b\"}]}'" security: - bearer_auth: - monitoring:create get: operationId: monitoring_list_sinks summary: Lists all sinks description: To list all sinks, send a GET request to `/v2/monitoring/sinks`. tags: - Monitoring parameters: - $ref: '#/components/parameters/resource_id' responses: '200': $ref: '#/components/responses/list_sinks' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks?resource_id=do:kubernetes:f2fcd5d9-f410-4f3a-8015-130ada94b1fe\"" security: - bearer_auth: - monitoring:read /v2/monitoring/sinks/{sink_uuid}: get: operationId: monitoring_get_sink summary: Get Sink description: To get the details of a sink (resources and destination), send a GET request to `/v2/monitoring/sinks/${sink_uuid}`. tags: - Monitoring parameters: - $ref: '#/components/parameters/sink_uuid' responses: '200': $ref: '#/components/responses/sinks' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/f945d774-86e8-4dc8-8f60-cfc76dd3d098\"" security: - bearer_auth: - monitoring:read delete: operationId: monitoring_delete_sink summary: Delete Sink description: To delete a sink, send a DELETE request to `/v2/monitoring/sinks/${sink_uuid}`. tags: - Monitoring parameters: - $ref: '#/components/parameters/sink_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' 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/sinks/aef7ff4a-f1be-4d9e-b886-650fcb5bdfe3\"" security: - bearer_auth: - monitoring:delete components: responses: sinks: description: The response is a JSON object with a `sink` key. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: sink: $ref: '#/components/schemas/sinks_response' droplet_bandwidth_metric_response: description: The response will be a JSON object with a key called `data` and `status`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/metrics' examples: Inbound Private Bandwidth: $ref: '#/components/examples/inbound_private_droplet_bandwidth' Inbound Public Bandwidth: $ref: '#/components/examples/inbound_public_droplet_bandwidth' Outbound Private Bandwidth: $ref: '#/components/examples/outbound_private_droplet_bandwidth' Outbound Public Bandwidth: $ref: '#/components/examples/outbound_public_droplet_bandwidth' monitoring_list_destinations: description: The response is a JSON object with a `destinations` key. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: destinations: type: array items: $ref: '#/components/schemas/destination_omit_credentials' no_content: description: The action was successful and the response body is empty. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' list_sinks: description: The response is a JSON object with a `sinks` key. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: sinks: type: array description: List of sinks identified by their URNs. items: $ref: '#/components/schemas/sinks_response' destination: description: The response is a JSON object with a `destination` key. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: destination: $ref: '#/components/schemas/destination_omit_credentials' app_metric_response: description: The response will be a JSON object with a key called `data` and `status`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/metrics' examples: Memory: $ref: '#/components/examples/app_memory_percentage' server_error: description: Server error. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: server_error message: Unexpected server-side error unauthorized: description: Unauthorized headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: unauthorized message: Unable to authenticate you. droplet_cpu_metric_response: description: The response will be a JSON object with a key called `data` and `status`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/metrics' examples: CPU: $ref: '#/components/examples/droplet_cpu' alert_policy_response: description: An alert policy. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: policy: $ref: '#/components/schemas/alert_policy' droplet_filesystem_metric_response: description: The response will be a JSON object with a key called `data` and `status`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/metrics' examples: Filesystem: $ref: '#/components/examples/droplet_filesystem' not_found: description: The resource was not found. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: not_found message: The resource you requested could not be found. accepted: 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: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' too_many_requests: description: API Rate limit exceeded headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: too_many_requests message: API Rate limit exceeded. list_alert_policy_response: description: A list of alert policies. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: allOf: - $ref: '#/components/schemas/list_alert_policy' - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/meta' example: 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 links: first: https//api.digitalocean.com/v2/monitoring/alerts?page=1&per_page=10 prev: https//api.digitalocean.com/v2/monitoring/alerts?page=2&per_page=10 next: https//api.digitalocean.com/v2/monitoring/alerts?page=4&per_page=10 last: https//api.digitalocean.com/v2/monitoring/alerts?page=5&per_page=10 meta: total: 50 metric_response: description: The response will be a JSON object with a key called `data` and `status`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/metrics' unexpected_error: description: Unexpected error headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: example_error message: some error message examples: inbound_private_droplet_bandwidth: value: status: success data: resultType: matrix result: - metric: direction: inbound host_id: '222651441' interface: private values: - - 1634052360 - '0.016600450090265357' - - 1634052480 - '0.015085955677299055' - - 1634052600 - '0.014941163855322308' - - 1634052720 - '0.016214285714285712' inbound_public_droplet_bandwidth: value: status: success data: resultType: matrix result: - metric: direction: inbound host_id: '222651441' interface: public values: - - 1634052360 - '0.016600450090265357' - - 1634052480 - '0.015085955677299055' - - 1634052600 - '0.014941163855322308' - - 1634052720 - '0.016214285714285712' droplet_filesystem: value: status: success data: resultType: matrix result: - metric: device: /dev/vda1 fstype: ext4 host_id: '222651441' mountpoint: / values: - - 1635386880 - '25832407040' - - 1635387000 - '25832407040' - - 1635387120 - '25832407040' app_memory_percentage: value: status: success data: resultType: matrix result: - metric: app_component: sample-application app_component_instance: sample-application-0 app_uuid: db3c021-15ad-4088-bfe8-99dc972b9cf6 values: - - 1634052360 - '5.016600450090265357' - - 1634052480 - '12.015085955677299055' - - 1634052600 - '8.014941163855322308' - - 1634052720 - '32.016214285714285712' outbound_public_droplet_bandwidth: value: status: success data: resultType: matrix result: - metric: direction: outbound host_id: '222651441' interface: public values: - - 1634052360 - '0.016600450090265357' - - 1634052480 - '0.015085955677299055' - - 1634052600 - '0.014941163855322308' - - 1634052720 - '0.016214285714285712' droplet_cpu: value: status: success data: resultType: matrix 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' outbound_private_droplet_bandwidth: value: status: success data: resultType: matrix result: - metric: direction: outbound host_id: '222651441' interface: private values: - - 1634052360 - '0.016600450090265357' - - 1634052480 - '0.015085955677299055' - - 1634052600 - '0.014941163855322308' - - 1634052720 - '0.016214285714285712' schemas: destination_request: type: object required: - config - type properties: name: type: string description: destination name example: managed_opensearch_cluster type: enum: - opensearch_dbaas - opensearch_ext description: 'The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearch cluster or `opensearch_ext` for an externally managed one. ' config: $ref: '#/components/schemas/opensearch_config_request' link_to_prev_page: type: object properties: prev: description: URI of the previous page of the results. type: string example: https://api.digitalocean.com/v2/images?page=1 link_to_last_page: type: object properties: last: description: URI of the last page of the results. type: string example: https://api.digitalocean.com/v2/images?page=2 page_links: type: object properties: pages: anyOf: - $ref: '#/components/schemas/forward_links' - $ref: '#/components/schemas/backward_links' - {} example: pages: first: https://api.digitalocean.com/v2/account/keys?page=1 prev: https://api.digitalocean.com/v2/account/keys?page=2 opensearch_config_request: type: object required: - endpoint properties: credentials: type: object description: Credentials for an OpenSearch cluster user. Optional if `cluster_uuid` is passed. properties: username: type: string example: username password: type: string example: password endpoint: type: string example: example.com description: host of the OpenSearch cluster cluster_uuid: type: string example: 85148069-7e35-4999-80bd-6fa1637ca385 description: A unique identifier for a managed OpenSearch cluster. cluster_name: type: string example: managed_dbaas_cluster description: Name of a managed OpenSearch cluster. index_name: type: string description: OpenSearch index to send logs to. example: logs retention_days: type: integer description: Number of days to retain logs in an OpenSearch cluster. example: 14 default: 14 list_alert_policy: type: object required: - policies properties: policies: type: array items: $ref: '#/components/schemas/alert_policy' opensearch_config_omit_credentials: type: object description: OpenSearch destination configuration with `credentials` omitted. properties: id: type: string description: A unique identifier for a configuration. example: 41078d41-165c-4cff-9f0a-19536e3e3d49 endpoint: type: string example: example.com description: host of the OpenSearch cluster cluster_uuid: type: string example: 85148069-7e35-4999-80bd-6fa1637ca385 description: A unique identifier for a managed OpenSearch cluster. cluster_name: type: string example: managed_dbaas_cluster description: Name of a managed OpenSearch cluster. index_name: type: string description: OpenSearch index to send logs to. example: logs retention_days: type: integer description: Number of days to retain logs in OpenSearch. example: 14 default: 14 metrics_data: type: object required: - resultType - result properties: result: type: array description: Result of query. items: $ref: '#/components/schemas/metrics_result' resultType: type: string enum: - matrix example: matrix alert_policy: type: object required: - uuid - type - description - compare - value - window - entities - tags - alerts - enabled properties: alerts: $ref: '#/components/schemas/alerts' compare: type: string example: GreaterThan enum: - GreaterThan - LessThan description: type: string example: CPU Alert enabled: type: boolean example: true entities: type: array items: type: string example: - '192018292' tags: type: array items: type: string example: - droplet_tag type: type: string 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 uuid: type: string example: 78b3da62-27e5-49ba-ac70-5db0b5935c64 value: type: number format: float example: 80 window: type: string enum: - 5m - 10m - 30m - 1h example: 5m alert_policy_request: type: object required: - type - description - compare - value - window - entities - tags - alerts - enabled properties: alerts: $ref: '#/components/schemas/alerts' compare: type: string example: GreaterThan enum: - GreaterThan - LessThan description: type: string example: CPU Alert enabled: type: boolean example: true entities: type: array items: type: string example: - '192018292' tags: type: array items: type: string example: - droplet_tag type: type: string 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 value: type: number format: float example: 80 window: type: string example: 5m enum: - 5m - 10m - 30m - 1h sink_resource: type: object required: - urn properties: urn: type: string pattern: ^do:kubernetes:.* example: do:kubernetes:f453aa14-646e-4cf8-8c62-75a19fb24ec2 description: The uniform resource name (URN) for the resource in the format do:resource_type:resource_id. name: type: string description: resource name example: managed_kubernetes_cluster urn: type: string pattern: ^do:(dbaas|domain|droplet|floatingip|loadbalancer|space|volume|kubernetes|vpc):.* example: do:droplet:13457723 description: The uniform resource name (URN) for the resource in the format do:resource_type:resource_id. forward_links: allOf: - $ref: '#/components/schemas/link_to_last_page' - $ref: '#/components/schemas/link_to_next_page' pagination: type: object properties: links: $ref: '#/components/schemas/page_links' slack_details: type: object required: - url - channel properties: channel: type: string example: Production Alerts description: Slack channel to notify of an alert trigger. url: type: string description: Slack Webhook URL. example: https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ destination: type: object required: - config properties: id: type: string description: A unique identifier for a destination. example: 01f30bfa-319a-4769-ba95-9d43971fb514 name: type: string description: destination name example: managed_opensearch_cluster type: enum: - opensearch_dbaas - opensearch_ext description: 'The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearch cluster or `opensearch_ext` for an externally managed one. ' example: opensearch_dbaas config: $ref: '#/components/schemas/opensearch_config' destination_omit_credentials: type: object properties: id: type: string description: A unique identifier for a destination. example: 01f30bfa-319a-4769-ba95-9d43971fb514 name: type: string description: destination name example: managed_opensearch_cluster type: enum: - opensearch_dbaas - opensearch_ext description: 'The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearch cluster or `opensearch_ext` for an externally managed one. ' example: opensearch_dbaas config: $ref: '#/components/schemas/opensearch_config_omit_credentials' link_to_first_page: type: object properties: first: description: URI of the first page of the results. type: string example: https://api.digitalocean.com/v2/images?page=1 error: type: object 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." type: string example: not_found message: description: A message providing additional information about the error, including details to help resolve it when possible. type: string example: The resource you were accessing could not be found. 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. type: string example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9 required: - id - message sinks_response: type: object required: - urn properties: destination: $ref: '#/components/schemas/destination' resources: type: array description: List of resources identified by their URNs. items: $ref: '#/components/schemas/sink_resource' metrics: type: object required: - status - data properties: data: $ref: '#/components/schemas/metrics_data' status: type: string example: success enum: - success - error backward_links: allOf: - $ref: '#/components/schemas/link_to_first_page' - $ref: '#/components/schemas/link_to_prev_page' meta_properties: type: object description: Information about the response itself. properties: total: description: Number of objects returned by the request. type: integer example: 1 meta: type: object properties: meta: allOf: - $ref: '#/components/schemas/meta_properties' - required: - total required: - meta opensearch_config: type: object required: - endpoint properties: id: type: string description: A unique identifier for a configuration. example: 41078d41-165c-4cff-9f0a-19536e3e3d49 credentials: type: object description: Credentials for an OpenSearch cluster user. Optional if `cluster_uuid` is passed. properties: username: type: string example: username password: type: string example: password endpoint: type: string example: example.com description: host of the OpenSearch cluster cluster_uuid: type: string example: 85148069-7e35-4999-80bd-6fa1637ca385 description: A unique identifier for a managed OpenSearch cluster. cluster_name: type: string example: managed_dbaas_cluster description: Name of a managed OpenSearch cluster. index_name: type: string description: OpenSearch index to send logs to. example: logs retention_days: type: integer description: 'Number of days to retain logs in OpenSearch (default: 14)' example: 14 alerts: type: object required: - slack - email properties: email: description: An email to notify on an alert trigger. example: - bob@exmaple.com type: array items: type: string slack: type: array description: Slack integration details. items: $ref: '#/components/schemas/slack_details' link_to_next_page: type: object properties: next: description: URI of the next page of the results. type: string example: https://api.digitalocean.com/v2/images?page=2 metrics_result: type: object required: - metric - values properties: metric: type: object description: An object containing the metric's labels. These labels are key/value pairs that vary depending on the metric being queried. For example, load balancer metrics contain a `lb_id` label, while Droplet metrics contain a `host_id` label, and App Platform metrics contain a `app_component` label. additionalProperties: type: string example: host_id: '19201920' values: type: array description: An array of values for the metric. example: - - 1435781430 - '1' - - 1435781445 - '1' items: type: array items: oneOf: - type: integer - type: string parameters: metric_timestamp_start: in: query name: start description: UNIX timestamp to start metric window. example: '1620683817' required: true schema: type: string network_direction: in: query name: direction description: The traffic direction. required: true example: inbound schema: type: string enum: - inbound - outbound parameters_app_id: in: query name: app_id description: The app UUID. example: 2db3c021-15ad-4088-bfe8-99dc972b9cf6 required: true schema: type: string metric_timestamp_end: in: query name: end description: UNIX timestamp to end metric window. example: '1620705417' required: true schema: type: string per_page: in: query name: per_page required: false description: Number of items returned per page schema: type: integer minimum: 1 default: 20 maximum: 200 example: 2 sink_uuid: in: path name: sink_uuid description: A unique identifier for a sink. required: true schema: type: string example: 78b172b6-52c3-4a4b-96d5-78d3f1a0b18c alert_uuid: in: path name: alert_uuid description: A unique identifier for an alert policy. required: true schema: type: string example: 4de7ac8b-495b-4884-9a69-1050c6793cd6 network_interface: in: query name: interface description: The network interface. required: true example: private schema: type: string enum: - private - public destination_uuid: in: path name: destination_uuid description: A unique identifier for a destination. required: true schema: type: string example: 1a64809f-1708-48ee-a742-dec8d481b8d1 resource_id: in: query name: resource_id description: A unique URN for a resource. schema: $ref: '#/components/schemas/urn' example: do:kubernetes:5ba4518b-b9e2-4978-aa92-2d4c727e8824 app_component: in: query name: app_component description: The app component name. example: sample-application required: false schema: type: string page: in: query name: page required: false description: Which 'page' of paginated results to return. schema: type: integer minimum: 1 default: 1 example: 1 parameters_load_balancer_id: in: query name: lb_id description: A unique identifier for a load balancer. required: true schema: type: string example: 4de7ac8b-495b-4884-9a69-1050c6793cd6 parameters_droplet_id: in: query name: host_id description: The droplet ID. example: '17209102' required: true schema: type: string headers: ratelimit-limit: schema: type: integer example: 5000 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. ratelimit-reset: schema: type: integer example: 1444931833 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. ratelimit-remaining: schema: type: integer example: 4816 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. securitySchemes: bearer_auth: type: http scheme: bearer description: '## OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/) - `dor_v1_` for OAuth refresh tokens ### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. ### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. ### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` '