> ## Documentation Index
> Fetch the complete documentation index at: https://tracecat-codex-docs-secrets-oauth-discoverability.mintlify.site/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
        catalog_mappings:
          items:
            $ref: '#/components/schemas/CatalogMappingSelection'
          type: array
          title: Catalog Mappings
          description: Explicit source-to-target model choices from the pull preview.
      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
        catalog_mapping_requirements:
          anyOf:
            - items:
                $ref: '#/components/schemas/CatalogMappingRequirement'
              type: array
            - type: 'null'
          title: Catalog Mapping Requirements
      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
    CatalogMappingSelection:
      properties:
        source_catalog_id:
          type: string
          format: uuid
          title: Source Catalog Id
        target_catalog_id:
          type: string
          format: uuid
          title: Target Catalog Id
      type: object
      required:
        - source_catalog_id
        - target_catalog_id
      title: CatalogMappingSelection
      description: User-selected target catalog row for one source catalog reference.
    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
    CatalogMappingRequirement:
      properties:
        source_catalog_id:
          type: string
          format: uuid
          title: Source Catalog Id
        model_provider:
          type: string
          title: Model Provider
        model_name:
          type: string
          title: Model Name
        reason:
          $ref: '#/components/schemas/CatalogMappingRequirementReason'
        message:
          type: string
          title: Message
        candidates:
          items:
            $ref: '#/components/schemas/CatalogMappingCandidate'
          type: array
          title: Candidates
        affected_presets:
          items:
            $ref: '#/components/schemas/CatalogMappingAffectedPreset'
          type: array
          title: Affected Presets
        affected_workflows:
          items:
            $ref: '#/components/schemas/CatalogMappingAffectedWorkflow'
          type: array
          title: Affected Workflows
      type: object
      required:
        - source_catalog_id
        - model_provider
        - model_name
        - reason
        - message
        - candidates
        - affected_presets
        - affected_workflows
      title: CatalogMappingRequirement
    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
    CatalogMappingRequirementReason:
      type: string
      enum:
        - ambiguous
        - invalid_selection
    CatalogMappingCandidate:
      properties:
        catalog_id:
          type: string
          format: uuid
          title: Catalog Id
        model_provider:
          type: string
          title: Model Provider
        model_name:
          type: string
          title: Model Name
        provider_name:
          type: string
          title: Provider Name
        model_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Display Name
        endpoint_hostname:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Hostname
        origin:
          type: string
          enum:
            - platform
            - organization
            - custom_provider
          title: Origin
      type: object
      required:
        - catalog_id
        - model_provider
        - model_name
        - provider_name
        - model_display_name
        - endpoint_hostname
        - origin
      title: CatalogMappingCandidate
    CatalogMappingAffectedPreset:
      properties:
        preset_slug:
          type: string
          title: Preset Slug
        preset_name:
          type: string
          title: Preset Name
        version:
          type: integer
          title: Version
        path:
          type: string
          title: Path
      type: object
      required:
        - preset_slug
        - preset_name
        - version
        - path
      title: CatalogMappingAffectedPreset
    CatalogMappingAffectedWorkflow:
      properties:
        workflow_source_id:
          type: string
          title: Workflow Source Id
        workflow_path:
          type: string
          title: Workflow Path
        workflow_title:
          type: string
          title: Workflow Title
        action_ref:
          type: string
          title: Action Ref
      type: object
      required:
        - workflow_source_id
        - workflow_path
        - workflow_title
        - action_ref
      title: CatalogMappingAffectedWorkflow
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````