mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-30 19:55:42 +00:00
rpc: index block events to support block event queries (#6226)
This commit is contained in:
@@ -1021,6 +1021,62 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
/block_search:
|
||||
get:
|
||||
summary: Search for blocks by BeginBlock and EndBlock events
|
||||
description: |
|
||||
Search for blocks by BeginBlock and EndBlock events.
|
||||
|
||||
See /subscribe for the query syntax.
|
||||
operationId: block_search
|
||||
parameters:
|
||||
- in: query
|
||||
name: query
|
||||
description: Query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: "block.height > 1000 AND valset.changed > 0"
|
||||
- in: query
|
||||
name: page
|
||||
description: "Page number (1-based)"
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
example: 1
|
||||
- in: query
|
||||
name: per_page
|
||||
description: "Number of entries per page (max: 100)"
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 30
|
||||
example: 30
|
||||
- in: query
|
||||
name: order_by
|
||||
description: Order in which blocks are sorted ("asc" or "desc"), by height. If empty, default sorting will be still applied.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
default: "desc"
|
||||
example: "asc"
|
||||
tags:
|
||||
- Info
|
||||
responses:
|
||||
"200":
|
||||
description: List of paginated blocks matching the search criteria.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BlockSearchResponse"
|
||||
"500":
|
||||
description: Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
/tx:
|
||||
get:
|
||||
summary: Get transactions by hash
|
||||
|
||||
Reference in New Issue
Block a user