Pipeline Execute

This contains APIs for Executing a Pipeline

Retry History for a given execution

Securityx-api-key
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute an Interrupt

Executes an Interrupt on a Given Execution

Securityx-api-key
Request
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" "UserMarkedFailure"
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Handles the interrupt for a given stage in a pipeline

Securityx-api-key
Request
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" "UserMarkedFailure"
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retry a executed pipeline with inputSet pipeline yaml

Securityx-api-key
Request
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
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.

notesForPipelineExecution
string
Default: ""

Notes of a pipeline execution

Request Body schema: application/yaml

Retry a executed pipeline with inputSet pipeline yaml

string
Responses
400

Bad Request

500

Internal server error

default

Returns execution details

post/pipeline/api/pipeline/execute/retry/{identifier}
Request samples
application/yaml

Retry a executed pipeline with Runtime Input YAML

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"
Response samples
No sample

Execute a Pipeline with Input Set References

Execute a Pipeline with Input Set References

Securityx-api-key
Request
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
string

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

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
notesForPipelineExecution
string
Default: ""

Notes of a pipeline execution

Request Body schema:
required
inputSetReferences
Array of strings

List of Input Set References to be merged

withMergedPipelineYaml
boolean

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

stageIdentifiers
Array of strings

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

lastYamlToMerge
string

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

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": [
    ],
  • "lastYamlToMerge": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Execute a Pipeline with Runtime Input YAML

Execute a Pipeline with Runtime Input YAML

Securityx-api-key
Request
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
string

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

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
notifyOnlyUser
boolean
Default: false
notesForPipelineExecution
string
Default: ""

Notes of a pipeline execution

Request Body schema: application/yaml

Enter Runtime Input YAML if the Pipeline contains Runtime Inputs. Template for this can be Fetched from /inputSets/template API.

string
Responses
400

Bad Request

500

Internal server error

default

Returns pipeline execution details

post/pipeline/api/pipeline/execute/{identifier}
Request samples
application/yaml

Execute Runtime Input YAML

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"
Response samples
No sample

Execute given Stages of a Pipeline

Securityx-api-key
Request
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
string

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

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

useFQNIfError
boolean
Default: false
notesForPipelineExecution
string
Default: ""

Notes of a pipeline execution

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": [
    ]
}