Query
query CreditUsage($input: CreditUsageInput!) {
creditUsage(input: $input) {
currency {
currencyId
displayName
symbol
units {
plural
singular
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
series {
eventCount
featureId
featureName
points {
eventCount
timestamp
value
}
tags {
key
value
}
totalCredits
}
}
}Variables
{
"input": {
"customerId": "string"
}
}Response
{
"data": {
"creditUsage": {
"currency": {
"currencyId": "string",
"displayName": "string",
"symbol": "string",
"units": {
"plural": "string",
"singular": "string"
}
},
"pageInfo": {
"endCursor": "value",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "value"
},
"series": [
{
"eventCount": 1,
"featureId": "string",
"featureName": "string",
"points": [
{
"eventCount": 1,
"timestamp": "value",
"value": 1.5
}
],
"tags": [
{
"key": "string",
"value": "string"
}
],
"totalCredits": 1.5
}
]
}
}
}Queries
creditUsage
Get the credit usage for a customer
QUERY
creditUsage(input: CreditUsageInput!): CreditUsage!Arguments
input
required
Returns
currency
Stigg custom currency object with minimal fields
pageInfo
Cursor-based pagination state for the returned series. startCursor/endCursor anchor the current page; hasNextPage/hasPreviousPage indicate whether further pages exist. The series axis is groupBy when provided, otherwise featureId
series
Series of credit usage data points
Query
query CreditUsage($input: CreditUsageInput!) {
creditUsage(input: $input) {
currency {
currencyId
displayName
symbol
units {
plural
singular
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
series {
eventCount
featureId
featureName
points {
eventCount
timestamp
value
}
tags {
key
value
}
totalCredits
}
}
}Variables
{
"input": {
"customerId": "string"
}
}Response
{
"data": {
"creditUsage": {
"currency": {
"currencyId": "string",
"displayName": "string",
"symbol": "string",
"units": {
"plural": "string",
"singular": "string"
}
},
"pageInfo": {
"endCursor": "value",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "value"
},
"series": [
{
"eventCount": 1,
"featureId": "string",
"featureName": "string",
"points": [
{
"eventCount": 1,
"timestamp": "value",
"value": 1.5
}
],
"tags": [
{
"key": "string",
"value": "string"
}
],
"totalCredits": 1.5
}
]
}
}
}