Query
query ConsumptionBudgets {
consumptionBudgets {
edges {
cursor
node {
unit
scope
workspace {
__typename
}
userUid
user {
__typename
}
agentSlug
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}Response
{
"data": {
"consumptionBudgets": {
"edges": [
{
"cursor": "string",
"node": {
"unit": "DINOAI_CREDITS",
"scope": "PLATFORM",
"workspace": {
"__typename": "Workspace"
},
"userUid": "string",
"user": {
"__typename": "User"
},
"agentSlug": "string"
}
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
},
"totalCount": 1
}
}
}consumptionBudgets
The consumption budgets of the workspaces the key can reach. The company’s PLATFORM budget is listed only for a company API key granted every workspace of the company. Needs dinoai:admin:read.
QUERY
consumptionBudgets(unit: ConsumptionUnit, workspaceUid: String, scopes: [ConsumptionBudgetScope!], first: Int, after: String): ConsumptionBudgetConnection!Arguments
unit
default:DINOAI_CREDITS
What the budgets count; DINOAI_CREDITS by default.
workspaceUid
String
The uid of one workspace whose budgets to list. Leave it out for every workspace the key can reach: a workspace key's own, or every workspace a company API key is allowed.
scopes
Only budgets of these scopes; every scope when left out, and none for an empty list.
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.
Returns
edges
This page, in order.
pageInfo
Where this page sits in the list.
totalCount
Int!
How many there are across all pages.
Query
query ConsumptionBudgets {
consumptionBudgets {
edges {
cursor
node {
unit
scope
workspace {
__typename
}
userUid
user {
__typename
}
agentSlug
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}Response
{
"data": {
"consumptionBudgets": {
"edges": [
{
"cursor": "string",
"node": {
"unit": "DINOAI_CREDITS",
"scope": "PLATFORM",
"workspace": {
"__typename": "Workspace"
},
"userUid": "string",
"user": {
"__typename": "User"
},
"agentSlug": "string"
}
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
},
"totalCount": 1
}
}
}