Pipelines

This contains APIs related to pipelines

getPipelinesCount

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
startTime
required
integer <int64>
endTime
required
integer <int64>
Request Body schema: application/json
required
Array of objects (OrgProjectIdentifier)
Responses
default

default response

post/pipeline/api/landingDashboards/pipelinesCount
Request samples
application/json
{
  • "orgProjectIdentifiers": [
    ]
}
Response samples
application/json
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Create 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.

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

File Path

commitMsg
string

File Path

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Default Branch

Request Body schema:

Pipeline YAML

string
Responses
400

Bad Request

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

Gets a Pipeline by identifier

Request
Security:
ApiKey (readwrite)
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

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

Update a Pipeline by identifier

Request
Security:
ApiKey (readwrite)
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

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

Default Folder Path

commitMsg
string

Commit Message

lastObjectId
string

Last Object Id

baseBranch
string

Default Branch

header Parameters
If-Match
string

Version of entity to match

Request Body schema:

Pipeline YAML to be updated

string
Responses
400

Bad Request

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

Deletes a Pipeline

Request
Security:
ApiKey (readwrite)
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

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

File Path

commitMsg
string

Commit Message

lastObjectId
string

Last Object Id

header Parameters
If-Match
string

Version of entity to match

Responses
400

Bad Request

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

Gets all the Steps for given Category

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

Step Category for which you needs all its steps

module
required
string

Module of the step to which it belongs

accountId
string

Account Identifier for the entity.

Responses
400

Bad Request

500

Internal server error

default

Returns steps for a given Category

get/pipeline/api/pipelines/steps
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipelines/steps?category=string&module=string&accountId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets all the Steps for given Category (V2 Version)

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

Account Identifier for the entity.

Request Body schema:

Step Pallete Filter request body

Array of objects (StepPalleteModuleInfo)
Responses
400

Bad Request

500

Internal server error

default

Returns steps for a given Category

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

Create a Pipeline API (V2 Version)

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.

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

File Path

commitMsg
string

File Path

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Default Branch

Request Body schema:

Pipeline YAML

string
Responses
400

Bad Request

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

Get all the Variables which can be used as expression in the 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.

Request Body schema:

Pipeline YAML

string
Responses
400

Bad Request

500

Internal server error

default

Returns all Variables used that are valid to be used as expression in pipeline.

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

Updates a Pipeline by identifier (V2 Version)

Request
Security:
ApiKey (readwrite)
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

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

Default Folder Path

commitMsg
string

Commit Message

lastObjectId
string

Last Object Id

baseBranch
string

Default Branch

header Parameters
If-Match
string

Version of entity to match

Request Body schema:

Pipeline YAML to be updated

string
Responses
400

Bad Request

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

List of pipelines

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.

page
integer <int32>
Default: 0

The number of the page to fetch

size
integer <int32>
Default: 25

The number of the elements to fetch

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

Branch Name

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.

Responses
400

Bad Request

500

Internal server error

default

Paginated list of pipelines.

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

Gets pipeline summary by pipeline identifier

Request
Security:
ApiKey (readwrite)
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

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

Gets Pipeline JSON with extra info for some fields

Request
Security:
ApiKey (readwrite)
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

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

Gets Pipeline JSON with extra info for some fields as required for Pipeline Governance

get/pipeline/api/pipelines/expandedJSON/{pipelineIdentifier}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/pipelines/expandedJSON/: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": [
    ]
}

getNotificationSchema

Request
Security:
ApiKey (readwrite)
Responses
400

Bad Request

500

Internal server error

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

Get the Execution Node by Execution 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.

nodeExecutionId
required
string

Id for the corresponding Node Execution

Responses
400

Bad Request

500

Internal server error

default

Returns Execution Node if it exists, else returns Null.

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

getPmsStepNodes

Request
Security:
ApiKey (readwrite)
Responses
400

Bad Request

500

Internal server error

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

getTemplateStepNode

Request
Security:
ApiKey (readwrite)
Responses
400

Bad Request

500

Internal server error

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

Refresh the feature flag cache

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

Account Identifier for the entity.

Responses
400

Bad Request

500

Internal server error

default

Refresh the feature flag cache

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