> ## Documentation Index
> Fetch the complete documentation index at: https://opendata.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List keys

> List distinct keys present in the log within an optional segment range.




## OpenAPI

````yaml /openapi/log.yaml get /api/v1/log/keys
openapi: 3.1.0
info:
  title: OpenData Log API
  version: 1.0.0
  description: HTTP API for the OpenData Log service — an append-only, key-partitioned log.
servers:
  - url: http://localhost:3001
    description: Local development server
security: []
paths:
  /api/v1/log/keys:
    get:
      summary: List keys
      description: |
        List distinct keys present in the log within an optional segment range.
      operationId: listKeys
      parameters:
        - name: start_segment
          in: query
          required: false
          description: Start segment ID (inclusive). Defaults to `0`.
          schema:
            type: integer
            format: uint32
            minimum: 0
        - name: end_segment
          in: query
          required: false
          description: End segment ID (exclusive). Defaults to `max uint32`.
          schema:
            type: integer
            format: uint32
            minimum: 0
        - name: limit
          in: query
          required: false
          description: Maximum number of keys to return.
          schema:
            type: integer
            minimum: 0
      responses:
        '200':
          description: List of keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeysResponse'
              example:
                status: success
                keys:
                  - key: ZXZlbnRz
                  - key: b3JkZXJz
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    KeysResponse:
      type: object
      description: Response listing distinct keys in the log.
      properties:
        status:
          type: string
          example: success
        keys:
          type: array
          items:
            $ref: '#/components/schemas/Key'
      required:
        - status
        - keys
    ErrorResponse:
      type: object
      description: Error response returned for all error cases.
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          description: Human-readable error message.
      required:
        - status
        - message
    Key:
      type: object
      description: Wrapper around a byte-string key (base64-encoded in JSON).
      properties:
        key:
          type: string
          format: byte
          description: The key bytes, base64-encoded.
      required:
        - key

````