pydo.apps.list_metrics_bandwidth_daily()

Description

Retrieve daily bandwidth usage metrics for multiple apps.

Request Sample

import os
from pydo import Client

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

req = {
    "app_ids": [
        "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
        "c2a93513-8d9b-4223-9d61-5e7272c81cf5",
    ],
    "date": "2023-01-17T00:00:00Z",
}

get_resp = client.apps.list_metrics_bandwidth_daily(body=req)

Responses

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

A JSON object with a app_bandwidth_usage key

Click to expand an example response for app_bandwidth_usage.
{
  "value": {
    "app_bandwidth_usage": [
      {
        "app_id": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
        "bandwidth_bytes": "513668"
      },
      {
        "app_id": "c2a93513-8d9b-4223-9d61-5e7272c81cf5",
        "bandwidth_bytes": "254847"
      }
    ],
    "date": "2023-01-17T00:00:00Z"
  }
}

Unauthorized

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

The resource was not found.

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

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}