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

# List Trigger Runs

> The runs the trigger started, open runs first, then by close time.

Workflow runs need ``workflow:read`` and agent runs ``agent:read``.
``status`` (repeatable) keeps runs in any of those states,
``workflow_id`` keeps that workflow's runs, and ``target_type`` keeps
workflow runs or agent runs.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json get /workspaces/{workspace_id}/triggers/{trigger_id}/runs
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/triggers/{trigger_id}/runs:
    get:
      tags:
        - triggers
      summary: List Trigger Runs
      description: |-
        The runs the trigger started, open runs first, then by close time.

        Workflow runs need ``workflow:read`` and agent runs ``agent:read``.
        ``status`` (repeatable) keeps runs in any of those states,
        ``workflow_id`` keeps that workflow's runs, and ``target_type`` keeps
        workflow runs or agent runs.
      operationId: triggers-list_trigger_runs
      parameters:
        - name: trigger_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Trigger Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            title: Limit
            description: Maximum items per page
            default: 20
          description: Maximum items per page
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  enum:
                    - RUNNING
                    - COMPLETED
                    - FAILED
                    - CANCELED
                    - TERMINATED
                    - CONTINUED_AS_NEW
                    - TIMED_OUT
                type: array
              - type: 'null'
            title: Status
        - name: target_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/TriggerTargetType'
              - type: 'null'
            title: Target Type
        - name: workflow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: wf_[0-9a-zA-Z]+
              - type: string
                pattern: wf-[0-9a-f]{32}
              - type: 'null'
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerRunsPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    TriggerTargetType:
      type: string
      enum:
        - workflow
        - agent
      title: TriggerTargetType
      description: What a trigger binding starts.
    TriggerRunsPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TriggerRunRead'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for next page
        prev_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Prev Cursor
          description: Cursor for previous page
        has_more:
          type: boolean
          title: Has More
          description: Whether more items exist
          default: false
        has_previous:
          type: boolean
          title: Has Previous
          description: Whether previous items exist
          default: false
        total_estimate:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Estimate
          description: Estimated total count from table statistics
      type: object
      required:
        - items
      title: TriggerRunsPage
      description: A page of a trigger's runs, open runs first, then by close time.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TriggerRunRead:
      properties:
        target_type:
          $ref: '#/components/schemas/TriggerTargetType'
        target_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Name
          description: >-
            The workflow's title (null if it was deleted), or for an agent run
            the agent preset's name, falling back to the session's title if the
            preset was deleted (null if the session was too)
        wf_exec_id:
          type: string
          title: Wf Exec Id
          description: The run's Temporal workflow ID
        workflow_id:
          anyOf:
            - type: string
            - type: string
              pattern: wf_[0-9a-zA-Z]+
            - type: string
              pattern: wf-[0-9a-f]{32}
            - type: 'null'
          title: Workflow Id
          description: The workflow, for a workflow run
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
          description: The agent session, for an agent run
        agent_preset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Preset Id
          description: The session's agent preset, for an agent run
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELED
            - TERMINATED
            - CONTINUED_AS_NEW
            - TIMED_OUT
          title: Status
        start_time:
          type: string
          format: date-time
          title: Start Time
        close_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Close Time
      type: object
      required:
        - target_type
        - wf_exec_id
        - status
        - start_time
      title: TriggerRunRead
      description: 'One run a trigger started: a workflow run or an agent session''s turn.'
    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
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.