> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Bash Events

> Search / List bash event events



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/bash/bash_events/search
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/bash/bash_events/search:
    get:
      tags:
        - Bash
      summary: Search Bash Events
      description: Search / List bash event events
      operationId: search_bash_events_api_bash_bash_events_search_get
      parameters:
        - in: query
          name: kind__eq
          required: false
          schema:
            anyOf:
              - enum:
                  - BashCommand
                  - BashOutput
                type: string
              - type: 'null'
            title: Kind  Eq
        - in: query
          name: command_id__eq
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Command Id  Eq
        - in: query
          name: timestamp__gte
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            title: Timestamp  Gte
        - in: query
          name: timestamp__lt
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            title: Timestamp  Lt
        - description: >-
            Only returns BashOutput events with order > this value. Useful for
            polling to fetch only new events since the last poll.
          in: query
          name: order__gt
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              Only returns BashOutput events with order > this value. Useful for
              polling to fetch only new events since the last poll.
            title: Filter to events with order greater than this value
        - in: query
          name: sort_order
          required: false
          schema:
            $ref: '#/components/schemas/BashEventSortOrder'
            default: TIMESTAMP
        - in: query
          name: page_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Optional next_page_id from the previously returned page
        - in: query
          name: limit
          required: false
          schema:
            default: 100
            exclusiveMinimum: 0
            maximum: 100
            title: The max number of results in the page
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BashEventPage'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    BashEventSortOrder:
      enum:
        - TIMESTAMP
        - TIMESTAMP_DESC
      title: BashEventSortOrder
      type: string
    BashEventPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BashEventBase'
          title: Items
          type: array
        next_page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Page Id
      required:
        - items
      title: BashEventPage
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    BashEventBase:
      discriminator:
        mapping:
          openhands__agent_server__models__BashCommand-Output__1: '#/components/schemas/BashCommand'
          openhands__agent_server__models__BashError-Output__1: '#/components/schemas/BashError'
          openhands__agent_server__models__BashOutput-Output__1: '#/components/schemas/BashOutput'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/BashCommand'
        - $ref: '#/components/schemas/BashError'
        - $ref: '#/components/schemas/BashOutput'
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    BashCommand:
      properties:
        command:
          description: The bash command to execute
          title: Command
          type: string
        cwd:
          anyOf:
            - type: string
            - type: 'null'
          description: The current working directory
          title: Cwd
        id:
          title: Id
          type: string
        kind:
          const: BashCommand
          title: Kind
          type: string
        timeout:
          default: 300
          description: The max number of seconds a command may be permitted to run.
          title: Timeout
          type: integer
        timestamp:
          format: date-time
          title: Timestamp
          type: string
      required:
        - command
        - kind
      title: BashCommand
      type: object
    BashError:
      properties:
        code:
          description: Code for the error - typically an error type
          title: Code
          type: string
        detail:
          description: Details about the error
          title: Detail
          type: string
        id:
          title: Id
          type: string
        kind:
          const: BashError
          title: Kind
          type: string
        timestamp:
          format: date-time
          title: Timestamp
          type: string
      required:
        - code
        - detail
        - kind
      title: BashError
      type: object
    BashOutput:
      description: >-
        Output of a bash command. A single command may have multiple pieces of
        output

        depending on how large the output is.
      properties:
        command_id:
          title: Command Id
          type: string
        exit_code:
          anyOf:
            - type: integer
            - type: 'null'
          description: Exit code None implies the command is still running.
          title: Exit Code
        id:
          title: Id
          type: string
        kind:
          const: BashOutput
          title: Kind
          type: string
        order:
          default: 0
          description: The order for this output, sequentially starting with 0
          title: Order
          type: integer
        stderr:
          anyOf:
            - type: string
            - type: 'null'
          description: The error output from the command
          title: Stderr
        stdout:
          anyOf:
            - type: string
            - type: 'null'
          description: The standard output from the command
          title: Stdout
        timestamp:
          format: date-time
          title: Timestamp
          type: string
      required:
        - command_id
        - kind
      title: BashOutput
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.