self-serve

The calling key's own metered units, day by day and endpoint by endpoint (quota-free: reading it never spends units).

get/v1/usage

Request

  • Base URL: https://api.mapmap.ai
  • URL: https://api.mapmap.ai/v1/usage
  • Auth: one of:
    • HTTP bearer
    • API key in query parameter api_key

Query parameters

fromstring

First UTC day of the window, YYYY-MM-DD, inclusive (default: first of the current month)

tostring

Last UTC day of the window, YYYY-MM-DD, inclusive (default: today)

Response

Weighted quota units for the calling key (identity-pooled where the key has an identity)

balance_millipenceinteger required

Prepaid credit balance of the owning identity, in internal millipence (1p = 1000 millipence); 0 for keys with no ledger, and for an unverified key on an account somebody has verified, which may not see or spend that account's credit.

fromstring required

First day of the reported window, YYYY-MM-DD UTC, inclusive.

identity_pooledboolean required

Whether the figures below are pooled across the owning identity's keys. True for self-served keys, whose monthly quota is held by the identity and shared by its keys; false for operator keys, which have no identity and are metered individually. An unverified key reads true on every address: its pool is the unverified keys of its address requested from the same network.

key_idstring required

Key id (UUID) of the calling key.

month_usedinteger required

Units counted against the monthly quota right now, the very number the quota check enforces on, so it always agrees with used_this_month on GET /v1/keys/self. Identity-pooled where applicable, and it includes units buffered but not yet flushed to usage_counters, so it can exceed total_units for a window that covers the whole month. Independent of from/to.

monthly_quotainteger required

Units allowed per calendar month (identity-bound for self-served keys).

tostring required

Last day of the reported window, YYYY-MM-DD UTC, inclusive.

total_unitsinteger required

Total weighted quota units across the whole window.

totalsobject required

Window totals in weighted quota units, keyed by endpoint label.

Changes

No recorded changes to this operation across all 1 revision of this API.