Ledgers

Get ledger statistics

Changed on

Returns aggregate usage statistics (transaction, volume, reference, posting, log, revert and Numscript-execution counts, plus ephemeral-evicted and transient-used volume tallies) for a ledger. Requires ledger:read scope. On live reads, transactionCount and logCount are FSM-backed. The seven usage-derived counters (postingCount, revertCount, numscriptExecutionCount, referenceCount, ephemeralEvictedCount, transientUsedCount, volumeCount) are materialised asynchronously in the serving replica's usagestore and may lag committed state even after the request's ReadIndex barrier. Note: for checkpoint-scoped (historical) reads, only transactionCount and logCount are checkpoint-consistent; the usage-derived counters (postingCount, revertCount, numscriptExecutionCount, referenceCount, ephemeralEvictedCount, transientUsedCount, volumeCount) are sourced from the live usagestore projection, which is not checkpoint-aware, and are returned as 0 at a checkpoint rather than a live value — treat 0 on a checkpoint read as "not available at this checkpoint".

get/v3/{ledgerName}/stats

Request

  • Base URL
    http://localhost:9000
  • URL
    http://localhost:9000/v3/{ledgerName}/stats
  • Auth
    • HTTP bearer
    • or none

Path parameters

ledgerNamestring required

Name of the ledger

Headers

X-Consistency'linearizable' | 'stale'

Read consistency. linearizable (the default) runs a Raft ReadIndex barrier and waits for the receiving node to apply up to it. stale serves the read from the receiving node's own store, with no barrier and no forwarding to the leader, so the answer may lag the leader. Matching ignores case and surrounding whitespace. An unknown value, or a repeated or comma-joined header, returns 400 INVALID_REQUEST on every /v3 route, writes included; a valid value has no effect on writes. The gRPC equivalent is the x-consistency request metadata.

Response

Ledger statistics retrieved successfully

Changes

    • info

      api operation id getLedgerStats removed and replaced with v3GetLedgerStats

    • info

      added the media type text/plain for the response with the status

    • info

      added the media type text/plain for the response with the status