Usage per Tenant

How much did each organization, tenant or service do? Use the usage API (or the Usage page of a tenant in the Enterprise UI) when you account for the organizations and tenants you run for your own customers.

Usage is recorded by the same call that counts an operation for your walt.id license, writes its event and its eIDAS audit entry. Usage, license usage and the enterprise_usage_total metric therefore always count the same operations the same way.

What is counted

TypeOne unit isCounted when
CREDENTIAL_ISSUEDa credential delivered by an issuerthe credential endpoint returned it
VERIFICATION_SESSIONa verification session that reached a resultthe wallet's response was processed, successful or failed
WALLET_CREATEDa wallet service createdit was stored
CREDENTIAL_RECEIVEDa credential stored in a walletit was stored (exact on partial failures)
CREDENTIAL_PRESENTEDa credential presented from a walletthe presentation was sent
KEY_OPERATIONa key generated, stored or imported in a KMSthe key was created (not for one that already existed)
DID_RESOLUTIONa DID resolved through the DID serviceit resolved
API_KEY_USAGEa request authenticated with an API keythe request was authenticated

Failed operations are not counted, except verifications, where a failed verification is a result too.

Query usage

CURL

Endpoint: /v1/usage | API Reference

Requires the view-usage permission on target. A role scoped to one tenant can read that tenant's usage, but not the organization's.

Example Request

curl -X 'GET' \
  'https://{orgID}.enterprise.sandbox.walt.id/v1/usage?target=waltid.customer-a&from=2026-09-01&to=2026-10-01&granularity=month&groupBy=tenant,type' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'

Query Parameters

  • target: String (optional) - A tenant (includes its sub-tenants), a service, or the organization. Defaults to the organization.
  • from, to: String (optional) - Dates (2026-09-01) or instants (2026-09-01T00:00:00Z), UTC, to exclusive, at most 400 days apart. Defaults to the last 30 days. Usage is counted per hour, so the range is widened to whole hours; the response gives the range used.
  • granularity: String (optional) - hour, day (default), month or total.
  • groupBy: String (optional) - Any of tenant, service, type, comma-separated. Defaults to type.

Response

  • 200 - Usage of the target, per period and the requested groups.

Example Response

{
  "organization": "waltid",
  "target": "waltid.customer-a",
  "from": "2026-09-01T00:00:00Z",
  "to": "2026-10-01T00:00:00Z",
  "granularity": "month",
  "groupBy": ["tenant", "type"],
  "rows": [
    { "period": "2026-09-01T00:00:00Z", "tenant": "waltid.customer-a", "type": "CREDENTIAL_ISSUED", "count": 1250 },
    { "period": "2026-09-01T00:00:00Z", "tenant": "waltid.customer-a", "type": "VERIFICATION_SESSION", "count": 980 }
  ]
}

A row's tenant is null for services directly under the organization, and its service is null for usage no service was addressed for (API key requests are counted for the organization).

Counts are written every minute, so the last minute is not included yet. A pod that stops abruptly loses at most its last minute of counts. Hourly counts are kept for 400 days, then removed by MongoDB; export them (for example monthly totals) if you need them longer.

Query the database directly

Usage is stored in the usage_aggregates collection. Each document is one tenant, service, type and hour as counted by one pod (pod), so always sum count over the documents you select:

{ "organization": "waltid", "tenant": "waltid.customer-a", "service": "waltid.customer-a.issuer",
  "type": "CREDENTIAL_ISSUED", "hour": ISODate("2026-09-14T10:00:00Z"), "pod": "3f6c...", "count": 42 }

Issuances per tenant in September:

db.usage_aggregates.aggregate([
  { $match: { organization: "waltid", type: "CREDENTIAL_ISSUED",
              hour: { $gte: ISODate("2026-09-01"), $lt: ISODate("2026-10-01") } } },
  { $group: { _id: "$tenant", count: { $sum: "$count" } } },
  { $sort: { _id: 1 } }
])

To include sub-tenants, match the tenant path as a prefix instead: tenant: { $regex: "^waltid\\.customer-a(\\.|$)" }.

License usage

GET /license/usage (super administrators) shows what counts against the walt.id license, for the whole installation and the current license period. It does not split by organization or tenant; the usage API does.

Last updated on November 3, 2026