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

# Trigger pipeline run

> Trigger the execution of a pipeline in a deployed project. This is useful when you want to automate pipeline runs without relying on Prophecy's built-in scheduling.

## Requirements

To run the API, the target pipeline must:

* Run on a [Prophecy fabric](/data-analysis/environment/fabrics/prophecy-fabrics).
* Be part of a published project.

In other words, the pipeline must be deployed.


## OpenAPI

````yaml post /api/trigger/pipeline
openapi: 3.0.3
info:
  title: Prophecy API - Pipeline Runs
  description: API for triggering and monitoring pipeline runs
  version: 1.0.0
servers: []
security: []
paths:
  /api/trigger/pipeline:
    parameters:
      - name: X-AUTH-TOKEN
        in: header
        description: Prophecy access token
        required: true
        schema:
          type: string
    post:
      tags:
        - Pipeline Runs
      summary: Trigger pipeline run
      description: >-
        Trigger the execution of a pipeline in a deployed project. This is
        useful when you want to automate pipeline runs without relying on
        Prophecy's built-in scheduling.
      operationId: triggerPipelineRun
      requestBody:
        description: Pipeline run trigger parameters
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - fabricId
                - pipelineName
                - projectId
              properties:
                fabricId:
                  type: integer
                  format: int64
                  description: >-
                    Unique identifier of the data fabric where the pipeline
                    resides. You can find the ID in the URL of the fabric
                    metadata page.
                pipelineName:
                  type: string
                  description: Name of the pipeline to be triggered.
                projectId:
                  type: string
                  description: >-
                    Unique ID of the project where the pipeline resides. You can
                    find this string in the URL of the project editor or
                    metadata page.
                parameters:
                  type: object
                  additionalProperties:
                    type: string
                    description: >-
                      Pipeline parameter name and value. The key is the name of
                      a pipeline parameter, and the value is the parameter value
                      to assign.
                  description: >-
                    Map of key-value pairs representing pipeline parameters.
                    These will override default parameter values.
                branch:
                  type: string
                  description: >-
                    Specific branch of the pipeline to execute. If omitted, the
                    current working branch is used.
                version:
                  type: string
                  description: >-
                    Specific version of the project containing the pipeline. If
                    omitted, the latest version is used.
                processName:
                  type: string
                  description: >-
                    Name of a specific gem within the pipeline. If provided, the
                    pipeline will not run beyond this gem. If no processName is
                    specified, the full pipeline is executed.
            example:
              fabricId: 33290
              pipelineName: bakehouse
              parameters:
                franchise_id: '3000007'
              version: '2'
              projectId: '41459'
              processName: franchise_reviews
      responses:
        '200':
          description: Pipeline run triggered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether the request to trigger the pipeline was
                      successful. It does not reflect the success of the
                      pipeline run.
                  runId:
                    type: string
                    description: Unique identifier of the pipeline run.
                  msg:
                    type: string
                    description: >-
                      Error message if the request to trigger the pipeline was
                      unsuccessful.
              examples:
                error:
                  summary: Response to a request with an invalid fabric ID
                  value:
                    success: false
                    msg: >-
                      error in triggering pipeline:
                      Success(Left(sdl.md.client.package$MetadataException:
                      Fabric with uid `2290` not found)) (of class
                      scala.util.Success)

````