Read the usage

The hours and the cost of each VM of the tenant, and the totals.

GET /v1/tenants/{tenant}/usage

curl -X GET "https://api.shako.dev/v1/tenants/acme/usage?since=1793491200" \
  -H "Authorization: Bearer $SHAKO_API_KEY"

200 (excerpt)

{
  "total_awake_hours": 12.5,
  "total_cost": 0.12
}

Authenticate with Authorization: Bearer <API key> on https://api.shako.dev. Role: contributor or owner.

Path parameters

tenantstringrequired
The tenant's name, from GET /v1/tenants.

Query parameters

sinceinteger, 0 to 4294967296default: all the usage
The start of the usage, as a Unix time in seconds.
daysbooleandefault: false
true: also the usage of each VM on each day.
utc_offsetinteger, -840 to 840default: 0
The clock of the days and the months, in minutes east of UTC, for example 60 for UTC+1.

Response

200 with the usage object.

Behavior

A deleted VM stays in the usage, with the state deleted.

The errors. All the endpoints of Billing.