For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.v2.apps.metrics.bandwidth_daily.post(body: App_metrics_bandwidth_usage_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | App_metrics_bandwidth_usage>
Description
Retrieve daily bandwidth usage metrics for multiple apps.
Parameters
appIds array of strings required
Example: ["4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "c2a93513-8d9b-4223-9d61-5e7272c81cf5"]
A list of app IDs to query bandwidth metrics for.
date string optional
Example: 2023-01-17T00:00:00Z
Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday.
Request Sample
Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const response = await client.v2.apps.metrics.bandwidth_daily.post({
appIds: [
"4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
"c2a93513-8d9b-4223-9d61-5e7272c81cf5",
],
date: new Date("2023-01-17T00:00:00Z"),
});
Response Example
Show Response Example
{
"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"
}
See /v2/apps/metrics/bandwidth_daily in the API reference for additional detail on responses, headers, parameters, and more.