Skip to main content

ai_usage_by_location

Retrieves AI usage by location, grouped by locations and applications. Supports filtering by app type (GEN_AI or EMBEDDED_AI), specific applications, and different metric types (Volume, Transactions, Users). When app_type is omitted, returns data for all application classes.

Arguments​

NameDescription
start_time - Long!The start of the time range in Unix milliseconds.
end_time - Long!The end of the time range in Unix milliseconds.
metric_type - GenAIMetricType!The metric type to aggregate (BY_VOLUME, BY_TRANSACTIONS, or BY_USERS).
apps - [String!]List of specific applications to include in the analysis.
app_type - AIAppTypeThe type of AI applications to filter by. If omitted, no app class filter is applied.
QUERY
query GENERATIVE_AI {
GENERATIVE_AI {
  ai_usage_by_location(start_time: "123456789", end_time: "123456789", metric_type: BY_VOLUME, apps: ["example_apps"], app_type: GEN_AI) {
    entries {
      id
      name
      total
      entries {
        name
        total
      }
    }
    obfuscated
  }
}
}
RESPONSE
{
"data": {
  "GENERATIVE_AI": {
    "ai_usage_by_location": {
  "entries": [{
    "id": 123,
    "name": "example_value",
    "total": 123,
    "entries": [{
      "name": "example_value",
      "total": 123
    }]
  }],
  "obfuscated": true
}
  }
}
}