---
title: "List the logs from a ledger"
method: GET
path: "/v2/{ledger}/logs"
tags: ["ledger.v2"]
---

# List the logs from a ledger

`GET /v2/{ledger}/logs`

List the logs from a ledger, sorted by ID in descending order.

## Path parameters

- `ledger` string, required

## Query parameters

- `pageSize` integer
- `cursor` string
- `pit` string, date-time
- `sort` string

## Request body

- object

## Response `200`

OK

- V2LogsCursorResponse
  - `resource` 'logs' — The resource type carried by this cursor
  - `cursor` object, required — Paginated cursor wrapping the list of logs
    - `pageSize` integer, required
    - `hasMore` boolean, required
    - `previous` string
    - `next` string
    - `data` V2Log[], required
      - `id` integer, required — Unique sequential identifier for this log entry within the ledger
      - `type` 'NEW_TRANSACTION' | 'SET_METADATA' | 'REVERTED_TRANSACTION' | 'DELETE_METADATA' | 'INSERTED_SCHEMA', required — The type of operation this log represents
      - `data` union, required — The payload of the log entry. Structure depends on the log type: - NEW_TRANSACTION: V2LogDataNewTransaction - SET_METADATA: V2LogDataSetMetadata - REVERTED_TRANSACTION: V2LogDataRevertedTransaction - DELETE_METADATA: V2LogDataDeleteMetadata - INSERTED_SCHEMA: V2LogDataInsertedSchema
        - V2LogDataNewTransaction — Payload for NEW_TRANSACTION log entries. Contains the created transaction and any account metadata set during creation.
          - `transaction` V2LogTransaction, required — Transaction structure as it appears in log payloads
            - `id` integer, required — Unique sequential identifier for this transaction within the ledger
            - `postings` V2Posting[], required — The fund movements making up the transaction
              - …
            - `metadata` V2Metadata, required — Arbitrary key/value pairs attached to the resource. Metadata is bi-temporal, so a point-in-time query returns the metadata as it stood at that time
            - `timestamp` string, date-time, required — The transaction time: when the transaction is considered to have occurred. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `reference` string — Optional caller-supplied identifier, unique within the ledger
            - `insertedAt` string, date-time — The request time: when the transaction was actually written to the ledger. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `updatedAt` string, date-time — When the transaction row was last modified
            - `revertedAt` string, date-time — When the transaction was reverted, on the request-time axis
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `postCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
          - `accountMetadata` object, required — Metadata applied to accounts involved in the transaction
        - V2LogDataSetMetadata — Payload for SET_METADATA log entries. Contains the target entity and the metadata that was set.
          - `targetType` 'ACCOUNT' | 'TRANSACTION', required — Type of the target entity
          - `targetId` union, required — Identifier of the entity the metadata was set on, either an account address or a transaction ID
            - string — Account address (when targetType is ACCOUNT)
            - integer — Transaction ID (when targetType is TRANSACTION)
          - `metadata` V2Metadata, required — Arbitrary key/value pairs attached to the resource. Metadata is bi-temporal, so a point-in-time query returns the metadata as it stood at that time
        - V2LogDataRevertedTransaction — Payload for REVERTED_TRANSACTION log entries. Contains both the original reverted transaction and the new reverting transaction.
          - `revertedTransaction` V2LogTransaction, required — Transaction structure as it appears in log payloads
            - `id` integer, required — Unique sequential identifier for this transaction within the ledger
            - `postings` V2Posting[], required — The fund movements making up the transaction
              - …
            - `metadata` V2Metadata, required — Arbitrary key/value pairs attached to the resource. Metadata is bi-temporal, so a point-in-time query returns the metadata as it stood at that time
            - `timestamp` string, date-time, required — The transaction time: when the transaction is considered to have occurred. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `reference` string — Optional caller-supplied identifier, unique within the ledger
            - `insertedAt` string, date-time — The request time: when the transaction was actually written to the ledger. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `updatedAt` string, date-time — When the transaction row was last modified
            - `revertedAt` string, date-time — When the transaction was reverted, on the request-time axis
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `postCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
          - `transaction` V2LogTransaction, required — Transaction structure as it appears in log payloads
            - `id` integer, required — Unique sequential identifier for this transaction within the ledger
            - `postings` V2Posting[], required — The fund movements making up the transaction
              - …
            - `metadata` V2Metadata, required — Arbitrary key/value pairs attached to the resource. Metadata is bi-temporal, so a point-in-time query returns the metadata as it stood at that time
            - `timestamp` string, date-time, required — The transaction time: when the transaction is considered to have occurred. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `reference` string — Optional caller-supplied identifier, unique within the ledger
            - `insertedAt` string, date-time — The request time: when the transaction was actually written to the ledger. See [bi-temporality](https://docs.formance.com/modules/ledger/working-with/bi-temporality)
            - `updatedAt` string, date-time — When the transaction row was last modified
            - `revertedAt` string, date-time — When the transaction was reverted, on the request-time axis
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `postCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
            - `preCommitEffectiveVolumes` V2AggregatedVolumes — Volumes aggregated per account and per asset
        - V2LogDataDeleteMetadata — Payload for DELETE_METADATA log entries. Contains the target entity and the metadata key that was deleted.
          - `targetType` 'ACCOUNT' | 'TRANSACTION', required — Type of the target entity
          - `targetId` union, required — Identifier of the entity the metadata was deleted from, either an account address or a transaction ID
            - string — Account address (when targetType is ACCOUNT)
            - integer — Transaction ID (when targetType is TRANSACTION)
          - `key` string, required — The metadata key that was deleted
        - V2LogDataInsertedSchema — Payload for INSERTED_SCHEMA log entries. Contains the schema that was inserted into the ledger.
          - `schema` V2Schema, required — Schema data structure for ledger schemas
            - `version` string, required — Schema version
            - `createdAt` string, date-time, required — Schema creation timestamp
            - `chart` V2ChartOfAccounts, required — Chart of account
            - `transactions` V2TransactionTemplates — Transaction templates
            - `queries` V2QueryTemplates — Query templates
      - `hash` string, required — SHA256 hash of the log entry, chained from the previous log for integrity verification
      - `date` string, date-time, required — Timestamp when the operation was recorded
      - `schemaVersion` string — Schema version used for validation when the log was created

## Other responses

- `default` — Error

## Changes

> 52 revisions in range; 44 could not be searched.

- **2026-03-25** `3ef3cb98f97a` — 1 breaking
  - the `cursor/data/items/data/oneOf[#/components/schemas/V2LogDataInsertedSchema]/schema/allOf[#/components/schemas/V2SchemaData]/queries/additionalProperties/params/sort` response's property type/format changed from ``/`` to `string`/`` for status `200`
- **2026-02-23** `0f0824721b6e` — 1 breaking
  - the response property `cursor/data/items/data/oneOf[#/components/schemas/V2LogDataInsertedSchema]/schema/allOf[#/components/schemas/V2SchemaData]/transactions` became optional for the status `200`
- **2026-02-20** `c0620f81a649` — 2 info
  - added the optional property `cursor/data/items/data/oneOf[#/components/schemas/V2LogDataInsertedSchema]/schema/allOf[#/components/schemas/V2SchemaData]/queries` to the response with the `200` status
  - added the optional property `resource` to the response with the `200` status

[Change history](https://skmtc.dev/formancehq/apis/ledger-api/changes/v2/:ledger/logs/get.md)

---

[API](https://skmtc.dev/formancehq/apis/ledger-api.md) · [All operations](https://skmtc.dev/formancehq/apis/ledger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/formancehq/ledger-api/revisions/fe945da1b75d/schema)
