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

# Pull Workflows

> Pull workflows from Git repository at specific commit.

Imports workflow definitions from the specified repository and commit,
with configurable conflict resolution strategy. Repository URL is retrieved
from workspace settings.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json post /workspaces/{workspace_id}/workflows/sync/pull
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}/workflows/sync/pull:
    post:
      tags:
        - workflows
      summary: Pull Workflows
      description: >-
        Pull workflows from Git repository at specific commit.


        Imports workflow definitions from the specified repository and commit,

        with configurable conflict resolution strategy. Repository URL is
        retrieved

        from workspace settings.
      operationId: workflows-pull_workflows
      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/WorkflowSyncPullRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    WorkflowSyncPullRequest:
      properties:
        commit_sha:
          type: string
          maxLength: 64
          minLength: 40
          title: Commit Sha
          description: Specific commit SHA to pull from
        dry_run:
          type: boolean
          title: Dry Run
          description: Validate only, don't perform actual import
          default: false
        sync_schedules:
          type: boolean
          title: Sync Schedules
          description: >-
            Apply schedule definitions from Git. Defaults off to preserve
            destination schedules.
          default: false
      type: object
      required:
        - commit_sha
      title: WorkflowSyncPullRequest
      description: Request model for pulling workflows from a Git repository.
    PullResult:
      properties:
        success:
          type: boolean
          title: Success
        commit_sha:
          type: string
          title: Commit Sha
        workflows_found:
          type: integer
          title: Workflows Found
        workflows_imported:
          type: integer
          title: Workflows Imported
        diagnostics:
          items:
            $ref: '#/components/schemas/PullDiagnostic'
          type: array
          title: Diagnostics
        message:
          type: string
          title: Message
        resource_counts:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/ResourcePullCount'
              type: object
            - type: 'null'
          title: Resource Counts
        resource_diffs:
          anyOf:
            - items:
                $ref: '#/components/schemas/PullResourceDiff'
              type: array
            - type: 'null'
          title: Resource Diffs
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
        resources:
          anyOf:
            - items:
                $ref: '#/components/schemas/SyncPreviewResource'
              type: array
            - type: 'null'
          title: Resources
      type: object
      required:
        - success
        - commit_sha
        - workflows_found
        - workflows_imported
        - diagnostics
        - message
      title: PullResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PullDiagnostic:
      properties:
        workflow_path:
          type: string
          title: Workflow Path
        workflow_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Title
        error_type:
          type: string
          enum:
            - conflict
            - validation
            - dependency
            - parse
            - github
            - system
            - transaction
          title: Error Type
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
      type: object
      required:
        - workflow_path
        - workflow_title
        - error_type
        - message
        - details
      title: PullDiagnostic
    ResourcePullCount:
      properties:
        found:
          type: integer
          title: Found
        imported:
          type: integer
          title: Imported
      type: object
      required:
        - found
        - imported
      title: ResourcePullCount
    PullResourceDiff:
      properties:
        resource_type:
          type: string
          title: Resource Type
        source_id:
          type: string
          title: Source Id
        source_path:
          type: string
          title: Source Path
        change_type:
          type: string
          enum:
            - added
            - modified
            - deleted
          title: Change Type
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        diff:
          type: string
          title: Diff
        truncated:
          type: boolean
          title: Truncated
          default: false
      type: object
      required:
        - resource_type
        - source_id
        - source_path
        - change_type
        - title
        - diff
      title: PullResourceDiff
    SyncPreviewResource:
      properties:
        resource_type:
          type: string
          title: Resource Type
        source_id:
          type: string
          title: Source Id
        name:
          type: string
          title: Name
        path:
          type: string
          title: Path
      type: object
      required:
        - resource_type
        - source_id
        - name
        - path
      title: SyncPreviewResource
    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

````