Skip to main content
GET
/
v1
/
tenant-usage
/
{tenantId}
/
subtenants
/
{subtenantId}
/
history
Get subtenant usage history
curl --request GET \
  --url https://api.devic.ai/v1/tenant-usage/{tenantId}/subtenants/{subtenantId}/history \
  --header 'Authorization: Bearer <token>'
[
  {
    "tenantId": "<string>",
    "subtenantId": "<string>",
    "windowEvery": 123,
    "windowStart": 123,
    "windowEnd": 123,
    "consumption": 123,
    "exemptConsumption": 123,
    "limit": 123,
    "percent": 123,
    "tierId": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Use JWT token for authentication

Path Parameters

tenantId
string
required

tenantId

subtenantId
string
required

subtenantId

Query Parameters

metric
enum<string>

Filter by metric

Available options:
tokens,
cost
windowUnit
enum<string>

Filter by window unit

Available options:
hour,
day,
week,
month
from
integer

Range start (epoch ms)

to
integer

Range end (epoch ms)

limit
integer

Max items

skip
integer

Items to skip

Response

Usage history rows

tenantId
string
subtenantId
string

Empty string for tenant-scope

scope
enum<string>
Available options:
tenant,
subtenant
metric
enum<string>
Available options:
tokens,
cost
windowUnit
enum<string>
Available options:
hour,
day,
week,
month
windowEvery
integer
windowStart
integer

Epoch ms

windowEnd
integer

Epoch ms

consumption
number

Amount counted toward the limit

exemptConsumption
number

Amount incurred by exempt entities (not counted toward the limit)

limit
number
percent
number
tierId
string