Execute

This contains APIs for executing a Pipeline.

Execute an Interrupt on an execution

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

interruptType
required
string

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

Enum: "ABORTALL" "ABORT" "PAUSE" "RESUME" "IGNORE" "STAGEROLLBACK" "STEPGROUPROLLBACK" "MARKASSUCCESS" "EXPIREALL" "RETRY"
Responses
400

Bad Request

500

Internal server error

default

Takes a possible Interrupt value and applies it onto the execution referred by the planExecutionId

put/pipeline/api/pipeline/execute/interrupt/{planExecutionId}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/interrupt/:planExecutionId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&interruptType=ABORTALL' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get Preflight Checks Response for a Preflight Id

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

preflightCheckId
required
string

Preflight Id from the start Preflight Checks API

Request Body schema:
string
Responses
400

Bad Request

500

Internal server error

default

Get Preflight Checks Response for a Preflight Id. May require Multiple Queries if Preflight is In Progress

get/pipeline/api/pipeline/execute/getPreflightCheckResponse
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute a pipeline with inputSet pipeline yaml

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:

InputSet YAML if the pipeline contains runtime inputs. This will be empty by default if pipeline does not contains runtime inputs

string
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details

post/pipeline/api/pipeline/execute/{identifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute a pipeline with inputSet pipeline yaml V2

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:

InputSet YAML if the pipeline contains runtime inputs. This will be empty by default if pipeline does not contains runtime inputs

string
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details V2

post/pipeline/api/pipeline/execute/{identifier}/v2
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute given Stages of a Pipeline

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Pipeline Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:
runtimeInputYaml
string
stageIdentifiers
Array of strings
object
Responses
400

Bad Request

500

Internal server error

default

Execute given Stages of a Pipeline with Runtime Input Yaml

post/pipeline/api/pipeline/execute/{identifier}/stages
Request samples
{
  • "runtimeInputYaml": "string",
  • "stageIdentifiers": [
    ],
  • "expressionValues": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Re-run given Stages of a Pipeline

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Pipeline Identifier

originalExecutionId
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:
runtimeInputYaml
string
stageIdentifiers
Array of strings
object
Responses
400

Bad Request

500

Internal server error

default

Re-run a given Stages Execution of a Pipeline

post/pipeline/api/pipeline/execute/rerun/{originalExecutionId}/{identifier}/stages
Request samples
{
  • "runtimeInputYaml": "string",
  • "stageIdentifiers": [
    ],
  • "expressionValues": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Re Execute a pipeline with inputSet pipeline yaml

Request
Security:
ApiKey (readwrite)
path Parameters
originalExecutionId
required
string

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

identifier
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:

InputSet YAML if the pipeline contains runtime inputs. This will be empty by default if pipeline does not contains runtime inputs

string
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details

post/pipeline/api/pipeline/execute/rerun/{originalExecutionId}/{identifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Re Execute a pipeline with InputSet Pipeline YAML Version 2

Request
Security:
ApiKey (readwrite)
path Parameters
originalExecutionId
required
string

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

identifier
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:

InputSet YAML if the pipeline contains runtime inputs. This will be empty by default if pipeline does not contains runtime inputs

string
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details

post/pipeline/api/pipeline/execute/rerun/v2/{originalExecutionId}/{identifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get retry stages for failed pipeline

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

planExecutionId of the execution we want to retry

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

pipelineIdentifier
string

Pipeline Identifier

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns all retry stages from where we can retry the failed pipeline

get/pipeline/api/pipeline/execute/{planExecutionId}/retryStages
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/:planExecutionId/retryStages?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&pipelineIdentifier=string&branch=string&repoIdentifier=string&getDefaultFromOtherRepo=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute a pipeline with input set references list

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
Request Body schema:
inputSetReferences
Array of strings
withMergedPipelineYaml
boolean
stageIdentifiers
Array of strings
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details V2

post/pipeline/api/pipeline/execute/{identifier}/inputSetList
Request samples
{
  • "inputSetReferences": [
    ],
  • "withMergedPipelineYaml": true,
  • "stageIdentifiers": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Rerun a pipeline with given inputSet identifiers

Request
Security:
ApiKey (readwrite)
path Parameters
originalExecutionId
required
string

Id of the execution from which we are running

identifier
required
string

Pipeline Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

The module from which execution was triggered.

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
required
boolean
Default: false

Use FQN in error response

Request Body schema:

InputSet reference details

inputSetReferences
Array of strings
withMergedPipelineYaml
boolean
stageIdentifiers
Array of strings
Responses
400

Bad Request

500

Internal server error

default

Returns details of new plan execution and git details if any

post/pipeline/api/pipeline/execute/rerun/{originalExecutionId}/{identifier}/inputSetList
Request samples
{
  • "inputSetReferences": [
    ],
  • "withMergedPipelineYaml": true,
  • "stageIdentifiers": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Handles the interrupt for a given stage in a pipeline

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

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

nodeExecutionId
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

interruptType
required
string

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

Enum: "ABORTALL" "ABORT" "PAUSE" "RESUME" "IGNORE" "STAGEROLLBACK" "STEPGROUPROLLBACK" "MARKASSUCCESS" "EXPIREALL" "RETRY"
Responses
400

Bad Request

500

Internal server error

default

Takes a possible Interrupt value and applies it onto the given stage in the execution

put/pipeline/api/pipeline/execute/interrupt/{planExecutionId}/{nodeExecutionId}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/interrupt/:planExecutionId/:nodeExecutionId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&interruptType=ABORTALL' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Handles Ignore,Abort,MarkAsSuccess,Retry on post manual intervention for a given execution with the given planExecutionId

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

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

nodeExecutionId
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

interruptType
required
string

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

Enum: "ABORTALL" "ABORT" "PAUSE" "RESUME" "IGNORE" "STAGEROLLBACK" "STEPGROUPROLLBACK" "MARKASSUCCESS" "EXPIREALL" "RETRY"
Responses
400

Bad Request

500

Internal server error

default

Takes a possible Interrupt value and applies it onto the given stage in the execution

put/pipeline/api/pipeline/execute/manualIntervention/interrupt/{planExecutionId}/{nodeExecutionId}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/manualIntervention/interrupt/:planExecutionId/:nodeExecutionId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&interruptType=ABORTALL' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Start Preflight Checks for a Pipeline

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

pipelineIdentifier
string

Pipeline Identifier

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Request Body schema:

Runtime Input YAML to be sent for Pipeline execution

string
Responses
400

Bad Request

500

Internal server error

default

Start Preflight Checks for a Pipeline, given a Runtime Input YAML. Returns Preflight Id

post/pipeline/api/pipeline/execute/preflightCheck
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

runASchemaMigration

Request
Security:
ApiKey (readwrite)
Responses
400

Bad Request

500

Internal server error

get/pipeline/api/pipeline/execute/internal/runSchema
Request samples
curl -i -X GET \
  https://app.harness.io/gateway/pipeline/api/pipeline/execute/internal/runSchema \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get list of Stages to select for Stage executions

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

pipelineIdentifier
required
string

Pipeline Identifier

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns list of Stage identifiers with their names and stage dependencies

get/pipeline/api/pipeline/execute/stagesExecutionList
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/stagesExecutionList?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&pipelineIdentifier=string&branch=string&repoIdentifier=string&getDefaultFromOtherRepo=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retry a executed pipeline with inputSet pipeline yaml

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Pipeline Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

moduleType
required
string

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

planExecutionId
required
string

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

retryStages
required
Array of strings

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

runAllStages
boolean
Default: true

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.

Request Body schema:
string
Responses
400

Bad Request

500

Internal server error

default

Returns execution details

post/pipeline/api/pipeline/execute/retry/{identifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retry History for a given execution

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

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

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

pipelineIdentifier
required
string

Pipeline Identifier

Responses
400

Bad Request

500

Internal server error

default

Returns retry history execution details

get/pipeline/api/pipeline/execute/retryHistory/{planExecutionId}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/retryHistory/:planExecutionId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&pipelineIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Latest ExecutionId from Retry Executions

Request
Security:
ApiKey (readwrite)
path Parameters
planExecutionId
required
string

planExecutionId of the execution of whose we need to find the latest execution planExecutionId

query Parameters
accountIdentifier
required
string

Account Identifier for the entity.

orgIdentifier
required
string

Organization Identifier for the entity.

projectIdentifier
required
string

Project Identifier for the entity.

pipelineIdentifier
required
string

Pipeline Identifier

Responses
400

Bad Request

500

Internal server error

default

Returns execution id of the latest execution from all retries

get/pipeline/api/pipeline/execute/latestExecutionId/{planExecutionId}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipeline/execute/latestExecutionId/:planExecutionId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&pipelineIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}