pydo.apps.get_metrics_bandwidth_daily()

Description

Retrieve daily bandwidth usage metrics for a single app.

Parameters

Name Type Required Description Default Value
app_id string True The app ID
date string False Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday.

Request Sample

import os
from pydo import Client

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

get_resp = client.apps.get_metrics_bandwidth_daily(app_id="4f6c71e2")

Responses

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"
      }
    ],
    "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"
}