Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pipeline Execute

This contains APIs for Executing a Pipeline

Retry History for a given execution

get
Path parameters
planExecutionIdstringRequired

planExecutionId of the execution of whose we need to find the retry history

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

pipelineIdentifierstringRequired

Pipeline Identifier

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/pipeline/execute/retryHistory/{planExecutionId}
GET /gateway/pipeline/api/pipeline/execute/retryHistory/{planExecutionId}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&pipelineIdentifier=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Execute an Interrupt

put

Executes an Interrupt on a Given Execution

Path parameters
planExecutionIdstringRequired

The Pipeline Execution Id on which the Interrupt needs to be applied.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

interruptTypestring · enumRequired

The Interrupt type needed to be applied to the execution. Choose a value from the enum list.

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/pipeline/execute/interrupt/{planExecutionId}
PUT /gateway/pipeline/api/pipeline/execute/interrupt/{planExecutionId}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&interruptType=AbortAll HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Marks the Manual Execution as fail or resume

post
Path parameters
nodeExecutionIdstringRequired

Node execution id on which the manual execution action is required

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

Body

Request for marking manual execution as fail or resume

actionstring · enumRequired

The action that user wants to do on manual execution i.e. mark it as fail or resume

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/manual-execution/{nodeExecutionId}
POST /gateway/pipeline/api/pipeline/execute/manual-execution/{nodeExecutionId}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "action": "MARK_AS_RESUME"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Handles the interrupt for a given stage in a pipeline

put
Path parameters
planExecutionIdstringRequired

The Pipeline Execution Id on which the Interrupt needs to be applied.

nodeExecutionIdstringRequired

The runtime Id of the step/stage on which the Interrupt needs to be applied.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

interruptTypestring · enumRequired

The Interrupt type needed to be applied to the execution. Choose a value from the enum list.

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/pipeline/execute/interrupt/{planExecutionId}/{nodeExecutionId}
PUT /gateway/pipeline/api/pipeline/execute/interrupt/{planExecutionId}/{nodeExecutionId}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&interruptType=AbortAll HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Retry a executed pipeline with inputSet pipeline yaml

post
Path parameters
identifierstring · min: 1 · max: 2147483647Required

Pipeline Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

moduleTypestringOptional

Module type for the entity. If its from deployments,type will be CD , if its from build type will be CI

planExecutionIdstringRequired

This param contains the previous execution execution id. This is basically when we are rerunning a Pipeline.

retryStagesstring[]Required

This param contains the identifier of stages from where to resume. It will be a list if we want to retry from parallel group

runAllStagesbooleanOptional

This param provides an option to run only the failed stages when Pipeline fails at parallel group. By default, it will run all the stages in the failed parallel group.

Default: true
notesForPipelineExecutionstringOptional

Notes of a pipeline execution

Default: ""
asyncPlanCreationbooleanOptionalDefault: false
Body
stringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/retry/{identifier}
POST /gateway/pipeline/api/pipeline/execute/retry/{identifier}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&planExecutionId=text&retryStages=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/yaml
Accept: */*
Content-Length: 1399

"|
  pipeline:
    identifier: \"Sample_Pipeline\"
    stages:
        - stage:
            identifier: \"Sample_Stage\"
            type: \"Approval\"
            spec:
                execution:
                    steps:
                        - step:
                            identifier: \"Approval_Step\"
                            type: \"HarnessApproval\"
                            spec:
                              approvers:
                                userGroups: 
                                  - account._account_all_users:
                        - step:
                            identifier: \"Shellscript_Step\"
                            type: \"ShellScript\"
                            spec:
                              source:
                                type: \"Inline\"
                                spec:
                                  script: \"exit 0\"
        - stage:
            identifier: \"Sample_Deploy_Stage\"
            type: \"Deployment\"
            spec:
              serviceConfig:
                serviceRef: \"service1\"
              infrastructure:
                  environmentRef: \"env1\"
                  infrastructureDefinition:
                                type: \"KubernetesDirect\"
                                spec:
                                  connectorRef: \"KubernetesConnector>\"
                                  namespace: \"default\"
"
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Retry a executed pipeline with Runtime Input YAML V2

post

Retry a executed pipeline with Runtime Input YAML and Expression Values V2

Path parameters
identifierstring · min: 1 · max: 2147483647Required

Pipeline Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

moduleTypestringOptional

Module type for the entity. If its from deployments,type will be CD , if its from build type will be CI

planExecutionIdstringRequired

This param contains the previous execution execution id. This is basically when we are rerunning a Pipeline.

retryStagesstring[]Required

This param contains the identifier of stages from where to resume. It will be a list if we want to retry from parallel group

runAllStagesbooleanOptional

This param provides an option to run only the failed stages when Pipeline fails at parallel group. By default, it will run all the stages in the failed parallel group.

Default: true
notesForPipelineExecutionstringOptional

Notes of a pipeline execution

Default: ""
asyncPlanCreationbooleanOptionalDefault: false
Body

Request Parameters for retrying a Pipeline execution

runtimeInputYamlstringOptional

Runtime Input YAML to be used for the retry execution.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/retry/v2/{identifier}
POST /gateway/pipeline/api/pipeline/execute/retry/v2/{identifier}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&planExecutionId=text&retryStages=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "runtimeInputYaml": "text",
  "expressionValues": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Execute a Pipeline with Input Set References

post

Execute a Pipeline with Input Set References

Path parameters
identifierstring · min: 1 · max: 2147483647Required

Pipeline identifier for the entity. Identifier of the Pipeline to be executed

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

moduleTypestringOptional

Module type for the entity. If its from deployments,type will be CD , if its from build type will be CI

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

useFQNIfErrorbooleanOptionalDefault: false
notesForPipelineExecutionstringOptional

Notes of a pipeline execution

Default: ""
asyncPlanCreationbooleanOptionalDefault: false
Body

Contains list of Input Set references and Stage Ids

inputSetReferencesstring[]Optional

List of Input Set References to be merged

withMergedPipelineYamlbooleanOptional

This is a boolean value that indicates if the response must contain the YAML for the merged Pipeline. The default value is False.

stageIdentifiersstring[]Optional

List of Stage Ids. Input Sets corresponding to these Ids will be merged.

lastYamlToMergestringOptional

Runtime Input Yaml needed to be merged into the result of the merged Yaml of the inputSetReferences

inputSetBranchNamestringOptional

InputSetBranchName

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/{identifier}/inputSetList
POST /gateway/pipeline/api/pipeline/execute/{identifier}/inputSetList?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "inputSetReferences": [
    "text"
  ],
  "withMergedPipelineYaml": true,
  "stageIdentifiers": [
    "text"
  ],
  "lastYamlToMerge": "text",
  "inputSetBranchName": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Execute a Pipeline with Runtime Input YAML

post

Execute a Pipeline with Runtime Input YAML

Path parameters
identifierstring · min: 1 · max: 2147483647Required

Pipeline identifier for the entity. Identifier of the Pipeline to be executed

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

moduleTypestringOptional

Module type for the entity. If its from deployments,type will be CD , if its from build type will be CI

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

useFQNIfErrorbooleanOptionalDefault: false
notifyOnlyUserbooleanOptionalDefault: false
notesForPipelineExecutionstringOptional

Notes of a pipeline execution

Default: ""
inputSetIdentifiersstring[]Optional

Input set identifiers for tracking and filtering pipeline executions. A list of input set identifiers to apply.

asyncPlanCreationbooleanOptionalDefault: false
shouldRunAsV1booleanOptional

Execute V0 pipeline using unified mode for enhanced features

Default: false
Body
stringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/{identifier}
POST /gateway/pipeline/api/pipeline/execute/{identifier}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/yaml
Accept: */*
Content-Length: 1399

"|
  pipeline:
    identifier: \"Sample_Pipeline\"
    stages:
        - stage:
            identifier: \"Sample_Stage\"
            type: \"Approval\"
            spec:
                execution:
                    steps:
                        - step:
                            identifier: \"Approval_Step\"
                            type: \"HarnessApproval\"
                            spec:
                              approvers:
                                userGroups: 
                                  - account._account_all_users:
                        - step:
                            identifier: \"Shellscript_Step\"
                            type: \"ShellScript\"
                            spec:
                              source:
                                type: \"Inline\"
                                spec:
                                  script: \"exit 0\"
        - stage:
            identifier: \"Sample_Deploy_Stage\"
            type: \"Deployment\"
            spec:
              serviceConfig:
                serviceRef: \"service1\"
              infrastructure:
                  environmentRef: \"env1\"
                  infrastructureDefinition:
                                type: \"KubernetesDirect\"
                                spec:
                                  connectorRef: \"KubernetesConnector>\"
                                  namespace: \"default\"
"
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Execute given Stages of a Pipeline

post
Path parameters
identifierstring · min: 1 · max: 2147483647Required

Pipeline Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

moduleTypestringOptional

Module type for the entity. If its from deployments,type will be CD , if its from build type will be CI

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

useFQNIfErrorbooleanOptionalDefault: false
notesForPipelineExecutionstringOptional

Notes of a pipeline execution

Default: ""
inputSetIdentifiersstring[]Optional

Input set identifiers for tracking and filtering pipeline executions. A list of input set identifiers to apply.

asyncPlanCreationbooleanOptionalDefault: false
Body

Request Parameters needed to run specific Stages of a Pipeline

runtimeInputYamlstringOptional
stageIdentifiersstring[]Optional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/pipeline/execute/{identifier}/stages
POST /gateway/pipeline/api/pipeline/execute/{identifier}/stages?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: pipeline-service-6c65d4b68c-lrg8j
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "runtimeInputYaml": "text",
  "stageIdentifiers": [
    "text"
  ],
  "expressionValues": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?