AlmondTill/G3N API

On this page

usageReport

query · in the family Billing and the wallet

What it does

What your group’s use of the platform consumes, day by day, in kernels — with a per-kind breakdown, and a drill to one person or one sitting.

YOUR group's metered consumption by UTC day, in KERNELS: composed off the daily rollup rows the billing RATER grows with every rated batch, ≤ 92 bounded point-reads — never a scan. ONE lane per call: no drill arg = the whole group (TOTAL); userId = that user's lane; sessionId = that session's lane (userId AND sessionId together refuse VALIDATION — one grain at a time). SELF-group BY CONSTRUCTION (the tokenEntries stance); days defaults 30, clamps 1..92; only days WITH usage answer. Events predating the attribution stamps roll into the group lane only — a user/session window over old history answers honestly empty. Requires authentication.

What happens

A read over the running consumption counters behind your kernel balance; one lane per call — the whole group, one user, or one session. Only days with usage appear; history from before the fine-grained stamps shows under the group lane only.

Who may call it

Capability area: Billing and the wallet — Your platform bill, token purchases and the usage and cost reads.

Arguments

NameTypeRequiredNotes
daysIntnoNo further notes.
userIdIDnoNo further notes.
sessionIdIDnoNo further notes.

Returns

UsageReportWindow UsageReportWindow! — YOUR group's consumption window at ONE lane: the days WITH usage, newest first, + the window totals.

Example request

query ExampleUsageReport($days: Int) {
  usageReport(days: $days) {
    totalCalls
    totalKernels
  }
}

Variables:

{
  "days": 1
}

Example response

{
  "data": {
    "usageReport": {
      "totalCalls": 1,
      "totalKernels": 1.5
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in