> ## 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.

# Create Workflow Run View

> Save a view. Sharing it with the workspace requires workflow:update.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json post /workspaces/{workspace_id}/workflow-run-views
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}/workflow-run-views:
    post:
      tags:
        - workflow-run-views
      summary: Create Workflow Run View
      description: Save a view. Sharing it with the workspace requires workflow:update.
      operationId: workflow-run-views-create_workflow_run_view
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ViewCreate_WorkflowRunViewQuery_WorkflowRunViewOrder_
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunViewRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    ViewCreate_WorkflowRunViewQuery_WorkflowRunViewOrder_:
      properties:
        name:
          $ref: '#/components/schemas/ViewName'
        visibility:
          $ref: '#/components/schemas/ViewVisibility'
          default: personal
        query:
          $ref: '#/components/schemas/WorkflowRunViewQuery'
        order_by:
          anyOf:
            - $ref: '#/components/schemas/WorkflowRunViewOrder'
            - type: 'null'
        sort:
          anyOf:
            - $ref: '#/components/schemas/ViewSort'
            - type: 'null'
        columns:
          anyOf:
            - $ref: '#/components/schemas/ViewColumns'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - name
        - query
      title: ViewCreate[WorkflowRunViewQuery, WorkflowRunViewOrder]
    WorkflowRunViewRead:
      properties:
        id:
          type: string
          title: Id
          description: A UUID for saved views, or a built-in view ID.
        kind:
          $ref: '#/components/schemas/ViewKind'
        name:
          type: string
          title: Name
        visibility:
          $ref: '#/components/schemas/ViewVisibility'
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        query:
          $ref: '#/components/schemas/WorkflowRunViewQuery'
        order_by:
          anyOf:
            - $ref: '#/components/schemas/WorkflowRunViewOrder'
            - type: 'null'
        sort:
          anyOf:
            - $ref: '#/components/schemas/ViewSort'
            - type: 'null'
        columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Columns
        can_edit:
          type: boolean
          title: Can Edit
          description: Whether the requesting user may rename, change, or delete it.
        pinned:
          type: boolean
          title: Pinned
          default: false
        pin_position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pin Position
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - kind
        - name
        - visibility
        - query
        - can_edit
      title: ViewRead[WorkflowRunViewQuery, WorkflowRunViewOrder]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ViewName:
      type: string
      maxLength: 255
      minLength: 1
    ViewVisibility:
      type: string
      enum:
        - personal
        - workspace
      title: ViewVisibility
      description: Who can see a saved view.
    WorkflowRunViewQuery:
      properties:
        search:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Search
        relation:
          anyOf:
            - $ref: '#/components/schemas/WorkflowExecutionRelationFilter'
            - type: 'null'
        status:
          anyOf:
            - items:
                type: string
                enum:
                  - RUNNING
                  - COMPLETED
                  - FAILED
                  - CANCELED
                  - TERMINATED
                  - CONTINUED_AS_NEW
                  - TIMED_OUT
              type: array
            - type: 'null'
          title: Status
        status_mode:
          anyOf:
            - $ref: '#/components/schemas/WorkflowExecutionStatusFilterMode'
            - type: 'null'
        trigger:
          anyOf:
            - items:
                $ref: '#/components/schemas/TriggerType'
              type: array
            - type: 'null'
          title: Trigger
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: string
              const: me
            - type: 'null'
          title: User Id
          description: 'Who started the run: a user ID, or `me` for whoever opens the view.'
        start_time:
          anyOf:
            - $ref: '#/components/schemas/RelativeTimeFilter'
            - type: 'null'
        close_time:
          anyOf:
            - $ref: '#/components/schemas/RelativeTimeFilter'
            - type: 'null'
        duration_gte_seconds:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Duration Gte Seconds
        duration_lte_seconds:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Duration Lte Seconds
      additionalProperties: false
      type: object
      title: WorkflowRunViewQuery
      description: The filters a run view applies to `/workflow-executions/search`.
    WorkflowRunViewOrder:
      type: string
      enum:
        - start_time
        - close_time
    ViewSort:
      type: string
      enum:
        - asc
        - desc
    ViewColumns:
      items:
        type: string
      type: array
      maxItems: 100
    ViewKind:
      type: string
      enum:
        - builtin
        - custom
    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
    WorkflowExecutionRelationFilter:
      type: string
      enum:
        - all
        - root
        - child
      title: WorkflowExecutionRelationFilter
    WorkflowExecutionStatusFilterMode:
      type: string
      enum:
        - include
        - exclude
      title: WorkflowExecutionStatusFilterMode
    TriggerType:
      type: string
      enum:
        - manual
        - scheduled
        - webhook
        - case
        - form
        - object_storage
        - table
      title: TriggerType
      description: Trigger type for a workflow execution.
    RelativeTimeFilter:
      properties:
        preset:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Preset
          description: A relative window owned by the UI, such as `1d` or `1w`.
        start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start
        end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End
      additionalProperties: false
      type: object
      title: RelativeTimeFilter
      description: 'A time window: a relative preset the UI resolves, or fixed bounds.'
  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.