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

# Query Task Workflow

> Query a Temporal workflow associated with a task for its current state.



## OpenAPI

````yaml https://agentex.dev-sgp.scale.com/openapi.json get /tasks/{task_id}/query/{query_name}
openapi: 3.1.0
info:
  title: Agentex API
  version: 0.1.0
servers: []
security: []
paths:
  /tasks/{task_id}/query/{query_name}:
    get:
      tags:
        - Tasks
      summary: Query Task Workflow
      description: Query a Temporal workflow associated with a task for its current state.
      operationId: query_task_workflow_tasks__task_id__query__query_name__get
      parameters:
        - name: query_name
          in: path
          required: true
          schema:
            type: string
            title: Query Name
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Query Task Workflow Tasks  Task Id  Query  Query
                  Name  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````