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:

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

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
curl -i -X DELETE \
  'https://app.harness.io/gateway/pipeline/api/pipelines/{pipelineIdentifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&branch=string&repoIdentifier=string&rootFolder=string&filePath=string&commitMsg=string&lastObjectId=string' \
  -H 'If-Match: string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
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
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipelines/{pipelineIdentifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&branch=string&repoIdentifier=string&getDefaultFromOtherRepo=true&getTemplatesResolvedPipeline=false' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
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
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipelines/summary/{pipelineIdentifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=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": [
    ]
}

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:

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
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
{
  • "pipelineTags": [
    ],
  • "pipelineIdentifiers": [
    ],
  • "name": "string",
  • "description": "string",
  • "moduleProperties": {
    },
  • "tags": {
    },
  • "filterType": "Connector"
}
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:

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