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

# Query Status

> Get the status of a query.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://api.roe-ai.com/v1/database/query/YOUR_QUERY_ID/status/?organization_id=YOUR_ORG_ID" \
    --header "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>


## OpenAPI

````yaml GET /v1/database/query/{worksheet_query_id}/status/
openapi: 3.1.0
info:
  title: Roe AI API
  version: 1.0.0
  description: Complete API documentation for Roe AI platform
servers:
  - url: https://api.roe-ai.com
    description: Production API
security: []
paths:
  /v1/database/query/{worksheet_query_id}/status/:
    get:
      tags:
        - v1
      description: Get the status of a query.
      operationId: v1_database_query_status_retrieve
      parameters:
        - in: path
          name: worksheet_query_id
          schema:
            type: string
            format: uuid
          required: true
        - name: organization_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Organization ID. This is required for access control. It can be
            provided via query or request body depending on the endpoint.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabaseQueryStatusResponse'
          description: ''
        '404':
          description: Query not found
components:
  schemas:
    DatabaseQueryStatusResponse:
      type: object
      properties:
        worksheet_query_id:
          type: string
          format: uuid
          description: The query task UUID.
        status:
          type: string
          description: The status of the query task.
        error:
          type:
            - string
            - 'null'
          description: An error message if the query failed.
        created_at:
          type: string
          format: date-time
          description: When the query was created.
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the query finished.
      required:
        - status
        - worksheet_query_id

````