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

# Get Continuous Query Task History

> Get aggregate user continuous query task history via the Junction API. Requires authentication with your team API key.

<Card horizontal icon="person-digging" color="#57164A">
  Junction Sense is in **closed beta**.

  Interested in Junction Sense? Get in touch with your Customer Success Manager.
</Card>


## OpenAPI

````yaml get /aggregate/v1/user/{user_id}/continuous_query/{query_id_or_slug}/task_history
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.495
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /aggregate/v1/user/{user_id}/continuous_query/{query_id_or_slug}/task_history:
    get:
      summary: Get Task History For Query
      operationId: >-
        get_task_history_for_query_aggregate_v1_user__user_id__continuous_query__query_id_or_slug__task_history_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: query_id_or_slug
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: string
            union_mode: left_to_right
            title: Query Id Or Slug
        - name: next_cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Next Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContinuousQueryTaskHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ContinuousQueryTaskHistoryResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ContinuousQueryTaskHistoryEntry'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - data
        - next_cursor
      title: ContinuousQueryTaskHistoryResponse
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ContinuousQueryTaskHistoryEntry:
      properties:
        query_id:
          type: string
          format: uuid
          title: Query Id
        user_id:
          type: string
          format: uuid
          title: User Id
        status:
          $ref: '#/components/schemas/ContinuousQueryTaskStatus'
          description: ℹ️ This enum is non-exhaustive.
        scheduled_at:
          type: string
          format: date-time
          title: Scheduled At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        error_details:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Details
      type: object
      required:
        - query_id
        - user_id
        - status
        - scheduled_at
        - started_at
        - ended_at
        - error_details
      title: ContinuousQueryTaskHistoryEntry
    ContinuousQueryTaskStatus:
      type: string
      enum:
        - scheduled
        - started
        - completed
        - error
        - skipped
      title: ContinuousQueryTaskStatus
      description: ℹ️ This enum is non-exhaustive.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````