> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Queries blockchain events with optional filters.



## OpenAPI

````yaml /specs/infrastructure.json get /blockchain/events
openapi: 3.1.0
info:
  title: resq-api
  description: ''
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  version: 0.1.0
servers: []
security: []
tags:
  - name: resq-backend
    description: ResQ Infrastructure API
  - name: auth
    description: Authentication endpoints
  - name: incidents
    description: Incident management endpoints
  - name: evidence
    description: Evidence management endpoints
  - name: blockchain
    description: Blockchain query endpoints
  - name: solana
    description: Solana program endpoints (PoD + airspace)
paths:
  /blockchain/events:
    get:
      tags:
        - blockchain
      summary: Queries blockchain events with optional filters.
      operationId: query_events
      parameters:
        - name: event_type
          in: query
          description: Filter by blockchain event type.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: start_time
          in: query
          description: Unix timestamp lower bound for event time.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
        - name: end_time
          in: query
          description: Unix timestamp upper bound for event time.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
        - name: incident_id
          in: query
          description: Filter events by associated incident ID.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: drone_id
          in: query
          description: Filter events by drone ID.
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: List of blockchain events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BlockchainEventResponse'
components:
  schemas:
    BlockchainEventResponse:
      type: object
      description: Response for a blockchain event.
      required:
        - event_id
        - event_type
        - timestamp
        - tx_hash
        - metadata
      properties:
        block_height:
          type:
            - integer
            - 'null'
          format: int64
          description: Block height at which the transaction was confirmed.
          minimum: 0
        drone_id:
          type:
            - string
            - 'null'
          description: Drone identifier associated with this event.
        event_id:
          type: string
          description: Unique event identifier.
        event_type:
          type: string
          description: Event classification.
        evidence_cid:
          type:
            - string
            - 'null'
          description: IPFS CID of evidence linked to this event.
        location:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Location'
              description: Geographic location associated with the event.
        metadata:
          description: Arbitrary event metadata.
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp when the event was recorded.
        tx_hash:
          type: string
          description: On-chain transaction hash.
    Location:
      type: object
      description: Geographic location data.
      required:
        - latitude
        - longitude
      properties:
        altitude:
          type:
            - number
            - 'null'
          format: double
          description: Altitude in metres above sea level.
        latitude:
          type: number
          format: double
          description: Decimal latitude in degrees.
        longitude:
          type: number
          format: double
          description: Decimal longitude in degrees.

````