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

# Get Action

> Get an action.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json get /workspaces/{workspace_id}/actions/{action_id}
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}/actions/{action_id}:
    get:
      tags:
        - actions
      summary: Get Action
      description: Get an action.
      operationId: actions-get_action
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: action_id
          in: path
          required: true
          schema:
            type: string
            title: Action Id
        - name: workflow_id
          in: query
          required: true
          schema:
            anyOf:
              - type: string
                pattern: wf_[0-9a-zA-Z]+
              - type: string
                pattern: wf-[0-9a-f]{32}
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    ActionRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        type:
          type: string
          title: Type
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        status:
          type: string
          title: Status
        inputs:
          type: string
          title: Inputs
        control_flow:
          $ref: '#/components/schemas/ActionControlFlow'
        is_interactive:
          type: boolean
          title: Is Interactive
        interaction:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResponseInteraction'
                - $ref: '#/components/schemas/ApprovalInteraction'
              description: An interaction configuration
              discriminator:
                propertyName: type
                mapping:
                  approval:
                    $ref: '#/components/schemas/ApprovalInteraction'
                  response:
                    $ref: '#/components/schemas/ResponseInteraction'
            - type: 'null'
          title: Interaction
        position_x:
          type: number
          title: Position X
          default: 0
        position_y:
          type: number
          title: Position Y
          default: 0
        upstream_edges:
          items:
            $ref: '#/components/schemas/ActionEdge'
          type: array
          title: Upstream Edges
        ref:
          type: string
          title: Ref
          readOnly: true
      type: object
      required:
        - id
        - type
        - title
        - description
        - status
        - inputs
        - is_interactive
        - ref
      title: ActionRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ActionControlFlow:
      properties:
        run_if:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Run If
        for_each:
          anyOf:
            - anyOf:
                - type: string
                - items:
                    type: string
                  type: array
              maxLength: 1000
            - type: 'null'
          title: For Each
        join_strategy:
          $ref: '#/components/schemas/JoinStrategy'
          default: all
        retry_policy:
          $ref: '#/components/schemas/ActionRetryPolicy'
        start_delay:
          type: number
          title: Start Delay
          description: >-
            Delay before starting the action in seconds. If `wait_until` is also
            provided, the `wait_until` timer will take precedence.
          default: 0
        wait_until:
          anyOf:
            - type: string
            - type: 'null'
          title: Wait Until
          description: >-
            Wait until a specific date and time before starting. Overrides
            `start_delay` if both are provided.
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
          description: Override environment for this action's execution
        mask_output:
          type: boolean
          title: Mask Output
          description: >-
            If true, redact this action's result in workflow execution API
            responses while preserving internal workflow data flow between
            actions.
          default: false
      type: object
      title: ActionControlFlow
    ResponseInteraction:
      properties:
        type:
          type: string
          const: response
          title: Type
        timeout:
          anyOf:
            - type: number
            - type: 'null'
          title: Timeout
          description: The timeout for the interaction in seconds.
      type: object
      required:
        - type
      title: ResponseInteraction
      description: Configuration for a response interaction.
    ApprovalInteraction:
      properties:
        type:
          type: string
          const: approval
          title: Type
        timeout:
          anyOf:
            - type: number
            - type: 'null'
          title: Timeout
          description: The timeout for the interaction in seconds.
        required_approvers:
          type: integer
          title: Required Approvers
          description: Number of approvers required before the action can proceed.
          default: 1
        approver_groups:
          items:
            type: string
          type: array
          title: Approver Groups
          description: List of groups that are allowed to approve this action.
        message:
          type: string
          title: Message
          description: Custom message to display to approvers.
          default: ''
        approve_if:
          anyOf:
            - type: string
            - type: 'null'
          title: Approve If
          description: Condition to approve the action.
      type: object
      required:
        - type
      title: ApprovalInteraction
      description: Configuration for an approval interaction.
    ActionEdge:
      properties:
        source_id:
          type: string
          title: Source Id
        source_type:
          type: string
          enum:
            - trigger
            - udf
          title: Source Type
        source_handle:
          type: string
          enum:
            - success
            - error
          title: Source Handle
      type: object
      required:
        - source_id
        - source_type
      title: ActionEdge
      description: |-
        Represents an incoming edge to an action.

        Stored in Action.upstream_edges to represent incoming connections.
    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
    JoinStrategy:
      type: string
      enum:
        - any
        - all
      title: JoinStrategy
    ActionRetryPolicy:
      properties:
        max_attempts:
          type: integer
          title: Max Attempts
          description: >-
            Total number of execution attempts. 0 means unlimited, 1 means no
            retries.
          default: 1
        timeout:
          type: integer
          title: Timeout
          description: Timeout for the action in seconds.
          default: 300
        retry_until:
          anyOf:
            - type: string
            - type: 'null'
          title: Retry Until
          description: Retry until a specific condition is met.
      type: object
      title: ActionRetryPolicy
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````