Prepared Queries

Create a prepared query

Changed on

Creates a new prepared query for a ledger. A prepared query defines a reusable filter that can be executed later with parameter substitution. Requires ledger:WriteQuery scope.

post/v3/{ledgerName}/prepared-queries

Request

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

Path parameters

ledgerNamestring required

Name of the ledger

Headers

Idempotency-Keystring

Idempotency key for the request

Request body

namestring required

Unique name for the prepared query

target'ACCOUNTS' | 'TRANSACTIONS' | 'LOGS' required

Target entity type. LOGS queries return log entries; the log-only filter fields (logId, date, ledger) are valid only when the target is LOGS.

Response

Prepared query created successfully

Changes

    • info

      api operation id createPreparedQuery removed and replaced with v3CreatePreparedQuery

    • 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

    • info

      added the non-success response with the status