Dashboard API > Billing profile
Retrieve all resource usages
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.
Returns
Returns an array of resource objects of type resource_usage.
Examples
GET https://site-api.datocms.com/resource-usages HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3curl -g 'https://site-api.datocms.com/resource-usages' \ \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3"await fetch("https://site-api.datocms.com/resource-usages", { headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", },});HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": [ { "type": "resource_usage", "id": "124", "attributes": { "quota": "", "current_usage": 20, "free_of_charge_usage": 20, "current_extra_usage": 20, "sites_current_usage": [ { "site_id": "", "site_name": "", "current_usage": 20, "recently_deleted": true } ], "usage_status": "", "forecast_message": "", "forecast": { "expected_usage": 20, "expected_extra_price": 20, "current_extra_price": 20, "upgrade_plan": { "id": "", "name": "", "free_of_charge_usage": 20 } } } } ]}