Query
query Usage($period: UsagePeriodInput!) {
usage(period: $period) {
from
to
dinoAi {
credits
backgroundAgentCredits
}
bolt {
billedSeconds
}
workspaces {
edges {
cursor
node {
__typename
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
}Variables
{
"period": {
"from": "value",
"to": "value"
}
}Response
{
"data": {
"usage": {
"from": "value",
"to": "value",
"dinoAi": {
"credits": "value",
"backgroundAgentCredits": "value"
},
"bolt": {
"billedSeconds": "value"
},
"workspaces": {
"edges": [
{
"cursor": "string",
"node": {
"__typename": "WorkspaceUsage"
}
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
},
"totalCount": 1
}
}
}
}usage
Bolt and DinoAI usage in a period, the numbers the Usage page shows. Needs usage:read.
QUERY
usage(period: UsagePeriodInput!, workspaceUid: String): UsageArguments
period
required
The period to sum usage over.
workspaceUid
String
The uid of one workspace to sum. Leave it out for every workspace the key can reach: a workspace key's own, or every workspace a company API key is allowed.
Returns
from
When the period starts, in UTC.
to
When the period ends, excluded, in UTC.
dinoAi
DinoAI credits, summed over the workspaces.
bolt
Billed Bolt run time, summed over the workspaces.
workspaces
The same period's usage, one workspace at a time.
Arguments
first
Int
default:100
How many to return: 100 by default, at most 500. 0 returns only totalCount.
after
String
The endCursor of the previous page.
Query
query Usage($period: UsagePeriodInput!) {
usage(period: $period) {
from
to
dinoAi {
credits
backgroundAgentCredits
}
bolt {
billedSeconds
}
workspaces {
edges {
cursor
node {
__typename
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
}Variables
{
"period": {
"from": "value",
"to": "value"
}
}Response
{
"data": {
"usage": {
"from": "value",
"to": "value",
"dinoAi": {
"credits": "value",
"backgroundAgentCredits": "value"
},
"bolt": {
"billedSeconds": "value"
},
"workspaces": {
"edges": [
{
"cursor": "string",
"node": {
"__typename": "WorkspaceUsage"
}
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
},
"totalCount": 1
}
}
}
}