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

# Query Workflow Runs

> Retrieve a paginated list of workflow runs with optional filtering. Use this to search for runs by status, date range, template, or custom metadata fields.

## Filtering Options

### Status Values

* `pending` - Queued for processing
* `processing` - Currently being processed
* `completed` - Successfully completed
* `failed` - Processing failed

### Metadata Filters

Search by custom metadata fields you provided during submission.

**Supported operators:** `=`, `!=`, `>`, `<`, `>=`, `<=`


## OpenAPI

````yaml /api-reference/openapi.json post /workflows/runs/getData
openapi: 3.0.3
info:
  title: EmberQA Call Scoring API
  description: >-
    Submit call recordings programmatically for scoring and analysis. This API
    allows you to integrate call scoring directly into your existing systems and
    workflows.


    ## Authentication

    All requests require a Bearer token in the Authorization header. API keys
    are provided on the EmberQA dashboard under the "Integrations" tab.


    ## Audio Requirements

    - **Supported formats:** MP3, WAV

    - **Maximum file size:** 100MB

    - **Audio quality:** Minimum 8kHz sample rate recommended
  version: 1.0.0
  contact:
    name: EmberQA Support
    url: https://emberqa.com
servers:
  - url: https://api.emberqa.com/api
    description: Production server
security:
  - BearerAuth: []
paths:
  /workflows/runs/getData:
    post:
      tags:
        - Workflow Runs
      summary: Query Workflow Runs
      description: >-
        Retrieve a paginated list of workflow runs with optional filtering. Use
        this to search for runs by status, date range, template, or custom
        metadata fields.
      operationId: getWorkflowsData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowsGetDataRequest'
            example:
              page: 1
              limit: 50
              filters:
                startTime: '2024-01-01T00:00:00Z'
                endTime: '2024-12-31T23:59:59Z'
                status: completed
                extraction_template_id: 123e4567-e89b-12d3-a456-426614174000
              metadata_filters:
                - metadata_name: priority
                  operator: '='
                  value: high
      responses:
        '200':
          description: Successfully retrieved workflow runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowsGetDataResponse'
              example:
                statusCode: SUCCESS
                statusMessage: Successfully retrieved workflow runs
                docs:
                  - id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                    filename: insurance-verification
                    status: completed
                    created_time: '2024-01-15T10:30:00Z'
                    output_schema: {}
                pagination:
                  currentPage: 1
                  totalPages: 5
                  totalCount: 243
                  limit: 50
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkflowsGetDataRequest:
      type: object
      properties:
        page:
          type: integer
          description: 'Page number for pagination (default: 1)'
          default: 1
          example: 1
        limit:
          type: integer
          description: 'Results per page (default: 50, max: 100)'
          default: 50
          maximum: 100
          example: 50
        filters:
          type: object
          properties:
            startTime:
              type: string
              format: date-time
              description: Filter runs created after this timestamp (ISO 8601)
            endTime:
              type: string
              format: date-time
              description: Filter runs created before this timestamp (ISO 8601)
            status:
              type: string
              enum:
                - pending
                - processing
                - completed
                - failed
              description: Filter by processing status
            extraction_template_id:
              type: string
              format: uuid
              description: Filter by extraction template ID
            filename:
              type: string
              description: Partial match search on run names/filenames
        metadata_filters:
          type: array
          items:
            type: object
            properties:
              metadata_name:
                type: string
                description: Name of the metadata field to filter on
              operator:
                type: string
                enum:
                  - '='
                  - '!='
                  - '>'
                  - <
                  - '>='
                  - <=
                description: Comparison operator
              value:
                type: string
                description: Value to compare against
          description: >-
            Array of metadata field filters based on custom metadata provided
            during submission
    WorkflowsGetDataResponse:
      type: object
      properties:
        statusCode:
          type: string
          example: SUCCESS
        statusMessage:
          type: string
          example: Successfully retrieved workflow runs
        docs:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowRunSummary'
        pagination:
          type: object
          properties:
            currentPage:
              type: integer
            totalPages:
              type: integer
            totalCount:
              type: integer
            limit:
              type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        details:
          type: string
          description: Additional details about the error (optional)
    WorkflowRunSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the workflow run
        filename:
          type: string
          description: Name of the workflow run (from run_id)
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current processing status
        created_time:
          type: string
          format: date-time
          description: Timestamp when the workflow was submitted
        output_schema:
          type: object
          additionalProperties:
            type: object
            properties:
              value:
                type: string
                nullable: true
                description: The extracted value, or null if not found
              reasoning:
                type: string
                nullable: true
                description: Explanation of how/why the value was extracted
          description: >-
            Extracted data (when status is completed). Each field contains a
            value and reasoning.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key obtained from the EmberQA dashboard under the "Integrations" tab

````