---
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'
  - `cursor` object, required
    - `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
            - `postings` V2Posting[], required
              - …
            - `metadata` V2Metadata, required
            - `timestamp` string, date-time, required
            - `reference` string
            - `insertedAt` string, date-time
            - `updatedAt` string, date-time
            - `revertedAt` string, date-time
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes
            - `postCommitEffectiveVolumes` V2AggregatedVolumes
            - `preCommitVolumes` V2AggregatedVolumes
            - `preCommitEffectiveVolumes` V2AggregatedVolumes
          - `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
            - string — Account address (when targetType is ACCOUNT)
            - integer — Transaction ID (when targetType is TRANSACTION)
          - `metadata` V2Metadata, required
        - 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
            - `postings` V2Posting[], required
              - …
            - `metadata` V2Metadata, required
            - `timestamp` string, date-time, required
            - `reference` string
            - `insertedAt` string, date-time
            - `updatedAt` string, date-time
            - `revertedAt` string, date-time
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes
            - `postCommitEffectiveVolumes` V2AggregatedVolumes
            - `preCommitVolumes` V2AggregatedVolumes
            - `preCommitEffectiveVolumes` V2AggregatedVolumes
          - `transaction` V2LogTransaction, required — Transaction structure as it appears in log payloads
            - `id` integer, required
            - `postings` V2Posting[], required
              - …
            - `metadata` V2Metadata, required
            - `timestamp` string, date-time, required
            - `reference` string
            - `insertedAt` string, date-time
            - `updatedAt` string, date-time
            - `revertedAt` string, date-time
            - `reverted` boolean, required — Indicates if the transaction has been reverted
            - `template` string — Transaction template used
            - `postCommitVolumes` V2AggregatedVolumes
            - `postCommitEffectiveVolumes` V2AggregatedVolumes
            - `preCommitVolumes` V2AggregatedVolumes
            - `preCommitEffectiveVolumes` V2AggregatedVolumes
        - 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
            - 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

- **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 changed from no type 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
- **2026-01-19** `ad7cbcfc83f7` — 2 breaking
  - added `#/components/schemas/V2LogDataNewTransaction, #/components/schemas/V2LogDataSetMetadata, #/components/schemas/V2LogDataRevertedTransaction, #/components/schemas/V2LogDataDeleteMetadata, #/components/schemas/V2LogDataInsertedSchema` to the `cursor/data/items/data` response property `oneOf` list for the response status `200`
  - the `cursor/data/items/data` response's property type changed from `object` to no type for status `200`
- …earlier changes not shown

[Full 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/3ef3cb98f97a/schema)
