Dashboard API > Daily Usage
Retrieve daily usage info for either an account or an organization
Warning: Experimental API
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Query parameters
yearstring
Year of the daily usages to retrieve. Defaults to current year.
Example:
"2024"
monthstring
Monthof the daily usages to retrieve. Defaults to current month.
Example:
"2"
Returns
Returns an array of resource objects of type daily_usage
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const dailyUsages = await client.dailyUsages.list();
for (const dailyUsage of dailyUsages) { // Check the 'Returned output' tab for the result ☝️ console.log(dailyUsage); }}
run();{ id: "412", date: "", cda_api_calls: 20, cma_api_calls: 20, cda_traffic_bytes: 20, cma_traffic_bytes: 20, assets_traffic_bytes: 20, mux_delivered_seconds: 20, mux_high_resolution_delivered_seconds: 20, mux_encoded_seconds: 20, smart_tags_detections: 20, site: { type: "site", id: "155" },}