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

# Define a stage and perform a test query



## OpenAPI

````yaml /api-reference/4.2/service-query-stages.json post /query-stages/test
openapi: 3.0.0
info:
  version: 4.2.6-rc1
  title: Fusion Service query-stages
servers:
  - url: /api/apollo/
security: []
tags:
  - name: query-stages
paths:
  /query-stages/test:
    post:
      tags:
        - 4.2 Query Stages API
      summary: Define a stage and perform a test query
      operationId: testStage
      parameters:
        - name: collection
          in: query
          description: Collection ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StageConfig'
        description: JSON-formatted stage configuration values
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryRequestAndResponse'
components:
  schemas:
    StageConfig:
      type: object
      properties:
        type:
          type: string
          readOnly: true
        id:
          type: string
          readOnly: true
        skip:
          type: boolean
          default: false
        label:
          type: string
        condition:
          type: string
    QueryRequestAndResponse:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/Request'
        response:
          $ref: '#/components/schemas/Response'
        totalTime:
          type: integer
          format: int64
        startTime:
          type: integer
          format: int64
        fieldNames:
          type: array
          uniqueItems: true
          items:
            type: string
    Request:
      type: object
      properties:
        initialParams:
          type: object
          readOnly: true
          additionalProperties:
            type: array
            items:
              type: string
        headers:
          type: object
          readOnly: true
          additionalProperties:
            type: array
            items:
              type: string
        params:
          type: object
          readOnly: true
          additionalProperties:
            type: array
            items:
              type: string
        httpMethod:
          type: string
          readOnly: true
        entityBytes:
          type: array
          readOnly: true
          items:
            type: string
            format: byte
        entityMediaType:
          $ref: '#/components/schemas/MediaType'
    Response:
      type: object
      properties:
        headers:
          type: object
          readOnly: true
          additionalProperties:
            type: array
            items:
              type: string
    MediaType:
      type: object
      properties:
        type:
          type: string
        subtype:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
        wildcardType:
          type: boolean
          default: false
        wildcardSubtype:
          type: boolean
          default: false

````