Pipeline

This contains APIs related to Setup of Pipelines

Create a PipelineDeprecated

Creates a Pipeline

SecurityApiKey
Request
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

File Path of the Entity.

commitMsg
string

File Path of the Entity.

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

storeType
string

Tells whether the Entity is to be saved on Git or not

Enum: "INLINE" "REMOTE"
repoName
string

Name of the repository.

Request Body schema:

Pipeline YAML

string
Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns created pipeline

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

Create a Pipeline

Creates a Pipeline

SecurityApiKey
Request
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

File Path of the Entity.

commitMsg
string

File Path of the Entity.

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

storeType
string

Tells whether the Entity is to be saved on Git or not

Enum: "INLINE" "REMOTE"
repoName
string

Name of the repository.

Request Body schema: application/yaml

Pipeline YAML

string
Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns created pipeline with metadata

post/pipeline/api/pipelines/v2
Request samples
application/yaml

Sample Pipeline YAML with One Build Stage and One Deploy Stage

pipeline:
    name: Sample Pipeline
    identifier: Sample_Pipeline
    allowStageExecutions: false
    projectIdentifier: Temp
    orgIdentifier: default
    tags: {}
    stages:
        - stage:
              name: Sample Stage
              identifier: Sample_Stage
              description: ""
              type: Approval
              spec:
                  execution:
                      steps:
                          - step:
                                name: Approval Step
                                identifier: Approval_Step
                                type: HarnessApproval
                                timeout: 1d
                                spec:
                                    approvalMessage: |-
                                        Please review the following information
                                        and approve the pipeline progression
                                    includePipelineExecutionHistory: true
                                    approvers:
                                        minimumCount: 1
                                        disallowPipelineExecutor: false
                                        userGroups: <+input>
                                    approverInputs: []
                          - step:
                                type: ShellScript
                                name: ShellScript Step
                                identifier: ShellScript_Step
                                spec:
                                    shell: Bash
                                    onDelegate: true
                                    source:
                                        type: Inline
                                        spec:
                                            script: <+input>
                                    environmentVariables: []
                                    outputVariables: []
                                    executionTarget: {}
                                timeout: 10m
              tags: {}
        - stage:
              name: Sample Deploy Stage
              identifier: Sample_Deploy_Stage
              description: ""
              type: Deployment
              spec:
                  serviceConfig:
                      serviceRef: <+input>
                      serviceDefinition:
                          spec:
                              variables: []
                          type: Kubernetes
                  infrastructure:
                      environmentRef: <+input>
                      infrastructureDefinition:
                          type: KubernetesDirect
                          spec:
                              connectorRef: <+input>
                              namespace: <+input>
                              releaseName: release-<+INFRA_KEY>
                      allowSimultaneousDeployments: false
                  execution:
                      steps:
                          - step:
                                name: Rollout Deployment
                                identifier: rolloutDeployment
                                type: K8sRollingDeploy
                                timeout: 10m
                                spec:
                                    skipDryRun: false
                      rollbackSteps:
                          - step:
                                name: Rollback Rollout Deployment
                                identifier: rollbackRolloutDeployment
                                type: K8sRollingRollback
                                timeout: 10m
                                spec: {}
              tags: {}
              failureStrategies:
                  - onFailure:
                        errors:
                            - AllErrors
                        action:
                            type: StageRollback
Response samples
No sample

Delete a Pipeline

Deletes a Pipeline by Identifier

SecurityApiKey
Request
path Parameters
pipelineIdentifier
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

header Parameters
If-Match
string

Version of Entity to match

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Boolean status whether request was successful or not

delete/pipeline/api/pipelines/{pipelineIdentifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Fetch a Pipeline

Returns a Pipeline by Identifier

SecurityApiKey
Request
path Parameters
pipelineIdentifier
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

getDefaultFromOtherRepo
boolean

if true, return all the default entities

getTemplatesResolvedPipeline
boolean
Default: false

This is a boolean value. If true, returns Templates resolved Pipeline YAML in the response else returns null.

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns pipeline YAML

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

Fetch Pipeline Summary

Returns Pipeline Summary by Identifier

SecurityApiKey
Request
path Parameters
pipelineIdentifier
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns Pipeline Summary having pipelineIdentifier as specified in request

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

List Pipelines

Returns List of Pipelines in the Given Project

SecurityApiKey
Request
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.

page
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

size
integer <int32>
Default: 25

Results per page

sort
Array of strings

Sort criteria for the elements.

searchTerm
string

Search term to filter out pipelines based on pipeline name, identifier, tags.

module
string
filterIdentifier
string
branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

getDefaultFromOtherRepo
boolean

if true, return all the default entities

getDistinctFromBranches
boolean

Boolean flag to get distinct pipelines from all branches.

Request Body schema: application/json

This is the body for the filter properties for listing pipelines.

Array of objects (NGTag)

This is the list of the Pipeline Tags on which the filter will be applied.

pipelineIdentifiers
Array of strings

This is the list of the Pipeline Identifiers on which the filter will be applied.

name
string

This is the Pipeline Name on which the filter will be applied.

description
string

This is the Pipeline Description on which the filter will be applied.

object

These are the Module Properties on which the filter will be applied.

object

Filter tags as a key-value pair.

filterType
required
string

This specifies the corresponding Entity of the filter.

Enum: "Connector" "DelegateProfile" "Delegate" "PipelineSetup" "PipelineExecution" "Deployment" "Audit" "Template" "EnvironmentGroup" "FileStore" "CCMRecommendation" "Anomaly" "Environment"
Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Paginated list of pipelines.

post/pipeline/api/pipelines/list
Request samples
application/json

Sample List Pipeline JSON Payload

{
  • "filterType": "PipelineSetup"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a PipelineDeprecated

Updates a Pipeline by Identifier

SecurityApiKey
Request
path Parameters
pipelineIdentifier
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

Path to the root folder of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

resolvedConflictCommitId
string

If the entity is git-synced, this parameter represents the commit id against which file conflicts are resolved

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

header Parameters
If-Match
string

Version of Entity to match

Request Body schema:

Pipeline YAML to be updated

string
Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns updated pipeline

put/pipeline/api/pipelines/{pipelineIdentifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a Pipeline

Updates a Pipeline by Identifier

SecurityApiKey
Request
path Parameters
pipelineIdentifier
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.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

Path to the root folder of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

resolvedConflictCommitId
string

If the entity is git-synced, this parameter represents the commit id against which file conflicts are resolved

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

header Parameters
If-Match
string

Version of Entity to match

Request Body schema: application/yaml

Pipeline YAML to be updated

string
Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns updated pipeline with metadata

put/pipeline/api/pipelines/v2/{pipelineIdentifier}
Request samples
application/yaml

Sample Pipeline YAML with One Build Stage and One Deploy Stage

pipeline:
    name: Sample Pipeline
    identifier: Sample_Pipeline
    allowStageExecutions: false
    projectIdentifier: Temp
    orgIdentifier: default
    tags: {}
    stages:
        - stage:
              name: Sample Stage
              identifier: Sample_Stage
              description: ""
              type: Approval
              spec:
                  execution:
                      steps:
                          - step:
                                name: Approval Step
                                identifier: Approval_Step
                                type: HarnessApproval
                                timeout: 1d
                                spec:
                                    approvalMessage: |-
                                        Please review the following information
                                        and approve the pipeline progression
                                    includePipelineExecutionHistory: true
                                    approvers:
                                        minimumCount: 1
                                        disallowPipelineExecutor: false
                                        userGroups: <+input>
                                    approverInputs: []
                          - step:
                                type: ShellScript
                                name: ShellScript Step
                                identifier: ShellScript_Step
                                spec:
                                    shell: Bash
                                    onDelegate: true
                                    source:
                                        type: Inline
                                        spec:
                                            script: <+input>
                                    environmentVariables: []
                                    outputVariables: []
                                    executionTarget: {}
                                timeout: 10m
              tags: {}
        - stage:
              name: Sample Deploy Stage
              identifier: Sample_Deploy_Stage
              description: ""
              type: Deployment
              spec:
                  serviceConfig:
                      serviceRef: <+input>
                      serviceDefinition:
                          spec:
                              variables: []
                          type: Kubernetes
                  infrastructure:
                      environmentRef: <+input>
                      infrastructureDefinition:
                          type: KubernetesDirect
                          spec:
                              connectorRef: <+input>
                              namespace: <+input>
                              releaseName: release-<+INFRA_KEY>
                      allowSimultaneousDeployments: false
                  execution:
                      steps:
                          - step:
                                name: Rollout Deployment
                                identifier: rolloutDeployment
                                type: K8sRollingDeploy
                                timeout: 10m
                                spec:
                                    skipDryRun: false
                      rollbackSteps:
                          - step:
                                name: Rollback Rollout Deployment
                                identifier: rollbackRolloutDeployment
                                type: K8sRollingRollback
                                timeout: 10m
                                spec: {}
              tags: {}
              failureStrategies:
                  - onFailure:
                        errors:
                            - AllErrors
                        action:
                            type: StageRollback
Response samples
No sample