Descanto Docs
CantoAPI Reference

Usage

Per-desktop and org-total usage and projected cost for a time range.

Query usage

GET /v1/usage

ParamInRequiredDescription
startqueryyesRange start, Unix milliseconds
endqueryyesRange end, Unix milliseconds
END=$(($(date +%s) * 1000))
START=$((END - 86400000)) # last 24h
curl -sS "$BASE/usage?start=$START&end=$END" -H "$AUTH"

Response (UsageResponse):

{
  "per_desktop": [
    {
      "desktop_id": "d_...",
      "awake_seconds": 36000.0,
      "weighted_awake_seconds": 36000.0,
      "desktop_months": 0.0139,
      "billing_mode": "hourly",
      "projected_cost_cents": 14
    }
  ],
  "org_awake_seconds_weighted": 36000.0,
  "org_desktop_months": 0.0139,
  "org_projected_cost_cents": 14
}
FieldTypeDescription
per_desktop[].desktop_idstring
per_desktop[].awake_secondsnumberRaw (unweighted) awake seconds within the queried range
per_desktop[].weighted_awake_secondsnumberAwake seconds weighted by tier
per_desktop[].desktop_monthsnumberExistence overlap with the range, as 30-day months
per_desktop[].billing_modestringmonthly or hourly
per_desktop[].projected_cost_centsintegerProjected cost at the locked prices
org_awake_seconds_weightednumberSum across the org
org_desktop_monthsnumberSum across the org
org_projected_cost_centsintegerSum across the org

See Concepts: Billing for the metering and rounding rules behind these numbers, and the locked price table.

StatusMeaning
200Per-desktop and org-total usage + projected cost
400Missing/non-numeric/out-of-range start or end, or start after end
401Missing/invalid credentials

On this page