Pipeline Input Set

This contains APIs related to Input Sets

List Input Sets

Lists all Input Sets for a Pipeline

Securityx-api-key
Request
query Parameters
pageIndex
integer <int32>
Default: 0

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

pageSize
integer <int32>
Default: 100

Results per page

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 for which we need the Input Sets list.

inputSetType
string
Default: "ALL"

Type of Input Set. The default value is ALL.

Enum: "ALL" "INPUT_SET" "OVERLAY_INPUT_SET"
searchTerm
string

Search term to filter out Input Sets based on name, identifier, tags.

sortOrders
Array of strings

Sort criteria for the elements.

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

Responses
400

Bad Request

500

Internal server error

default

Fetch all the Input Sets for a Pipeline, including Overlay Input Sets.

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

Create an Input Set

Creates an Input Set for a Pipeline

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

pipelineIdentifier
required
string

Pipeline Identifier for the entity.

pipelineBranch
string

Github branch of the Pipeline for which the Input Set is to be created

pipelineRepoID
string

Github Repo identifier of the Pipeline for which the Input Set is to be created

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

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.

isHarnessCodeRepo
boolean

Is Harness code repo enabled

InputSetVersion
string
Default: "0"

Input set yaml version, should be one of '0' or '1'

Request Body schema: application/yaml
required

Input set YAML to be created. The Account, Org, Project, and Pipeline identifiers inside the YAML should match the query parameters.

string
Responses
400

Bad Request

500

Internal server error

default

If the YAML is valid, returns created Input Set. If not, it sends what is wrong with the YAML

post/pipeline/api/inputSets
Request samples
application/yaml

Sample Input Set YAML

inputSet:
    name: Sample Input Set
    tags: {}
    identifier: Sample_Input_Set
    orgIdentifier: default
    projectIdentifier: MISC
    pipeline:
        identifier: Sample_Pipeline
        stages:
            - stage:
                  identifier: Sample_Stage
                  type: Approval
                  spec:
                      execution:
                          steps:
                              - step:
                                    identifier: Approval_Step
                                    type: HarnessApproval
                                    spec:
                                        approvers:
                                            userGroups:
                                                - account.Admins
                              - step:
                                    identifier: Shellscript_Step
                                    type: ShellScript
                                    spec:
                                        source:
                                            type: Inline
                                            spec:
                                                script: echo "ShellScript"
            - stage:
                  identifier: Sample_Deploy_Stage
                  type: Deployment
                  spec:
                      serviceConfig:
                          serviceRef: Service1
                      infrastructure:
                          environmentRef: Env1
                          infrastructureDefinition:
                              type: KubernetesDirect
                              spec:
                                  connectorRef: account.harnessciplatform
                                  namespace: sample
Response samples
No sample

Create an Overlay Input Set for a pipeline

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

pipelineIdentifier
required
string

Pipeline Identifier for the entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

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.

isHarnessCodeRepo
boolean

Is Harness code repo enabled

Request Body schema:
required

Overlay Input Set YAML to be created. The Account, Org, Project, and Pipeline identifiers inside the YAML should match the query parameters

string
Responses
400

Bad Request

500

Internal server error

default

If the YAML is valid, returns created Overlay Input Set. If not, it sends what is wrong with the YAML

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

Fetch an Input Set

Returns Input Set for a Given Identifier (Throws an Error if no Input Set Exists)

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier for the Input Set

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 for the entity.

pipelineBranch
string

Github branch of the Pipeline for which the Input Set is to be fetched

pipelineRepoID
string

Github Repo identifier of the Pipeline for which the Input Set is to be fetched

loadFromFallbackBranch
boolean
Default: false
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

header Parameters
Load-From-Cache
string
Default: false
Responses
400

Bad Request

500

Internal server error

default

Returns Input Set if exists for the given Identifier.

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

Update an Input Set

Updates the Input Set for a Pipeline

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier for the Input Set that needs to be updated. An Input Set corresponding to this identifier should already exist.

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 for the entity.

pipelineBranch
string

Github branch of the Pipeline for which the Input Set is to be updated

pipelineRepoID
string

Github Repo Id of the Pipeline for which the Input Set is to be updated

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Its required field during update call request. It can be fetched from the response of GET API call for the entity

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

lastCommitId
string

last commit id of the file

isNewBranch
boolean
Default: false

Checks the new branch

isHarnessCodeRepo
boolean

Is Harness code repo enabled

InputSetVersion
string
Default: "0"

Input set yaml version, should be one of '0' or '1'

header Parameters
If-Match
string

Version of Entity to match

Request Body schema: application/yaml
required

Input set YAML to be updated. The query parameters should match the Account, Org, Project, and Pipeline Ids in the YAML.

string
Responses
400

Bad Request

500

Internal server error

default

If the YAML is valid, returns the updated Input Set. If not, it sends what is wrong with the YAML

put/pipeline/api/inputSets/{inputSetIdentifier}
Request samples
application/yaml

Sample Input Set YAML

inputSet:
    name: Sample Input Set
    tags: {}
    identifier: Sample_Input_Set
    orgIdentifier: default
    projectIdentifier: MISC
    pipeline:
        identifier: Sample_Pipeline
        stages:
            - stage:
                  identifier: Sample_Stage
                  type: Approval
                  spec:
                      execution:
                          steps:
                              - step:
                                    identifier: Approval_Step
                                    type: HarnessApproval
                                    spec:
                                        approvers:
                                            userGroups:
                                                - account.Admins
                              - step:
                                    identifier: Shellscript_Step
                                    type: ShellScript
                                    spec:
                                        source:
                                            type: Inline
                                            spec:
                                                script: echo "ShellScript"
            - stage:
                  identifier: Sample_Deploy_Stage
                  type: Deployment
                  spec:
                      serviceConfig:
                          serviceRef: Service1
                      infrastructure:
                          environmentRef: Env1
                          infrastructureDefinition:
                              type: KubernetesDirect
                              spec:
                                  connectorRef: account.harnessciplatform
                                  namespace: sample
Response samples
No sample

Delete an Input Set

Deletes the Input Set by Identifier

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier of the Input Set that should be deleted.

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 for the entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

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

500

Internal server error

default

Return the Deleted Input Set

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

Gets an Overlay Input Set by identifier

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier for the Overlay Input Set

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 for the entity.

pipelineBranch
string

Github branch of the Pipeline for which the Input Set is to be fetched

pipelineRepoID
string

Github Repo identifier of the Pipeline for which the Input Set is to be fetched

loadFromFallbackBranch
boolean
Default: false
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

header Parameters
Load-From-Cache
string
Default: false
Responses
400

Bad Request

500

Internal server error

default

The Overlay Input Set that corresponds to the given Overlay Input Set Identifier

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

Update an Overlay Input Set for a pipeline

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier for the Overlay Input Set that needs to be updated.

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 for the entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Its required field during update call request. It can be fetched from the response of GET API call for the entity

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

lastCommitId
string

last commit id of the file

isNewBranch
boolean
Default: false

Checks the new branch

isHarnessCodeRepo
boolean

Is Harness code repo enabled

header Parameters
If-Match
string

Version of Entity to match

Request Body schema:
required

Overlay Input Set YAML to be updated. The Account, Org, Project, and Pipeline identifiers inside the YAML should match the query parameters, and the Overlay Input Set identifier cannot be changed.

string
Responses
400

Bad Request

500

Internal server error

default

If the YAML is valid, returns the updated Overlay Input Set. If not, it sends what is wrong with the YAML

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

Fetch Runtime Input Template

Returns Runtime Input Template for a Pipeline

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

pipelineIdentifier
required
string

Pipeline identifier for which we need the Runtime Input Template.

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

header Parameters
Load-From-Cache
string
Default: false
Request Body schema:
stageIdentifiers
Array of strings

List of Stage identifiers for which the Runtime Input template is needed

Responses
400

Bad Request

500

Internal server error

default

Fetch Runtime Input Template for a Pipeline, along with any expressions whose value is needed for running specific Stages

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

Update git-metadata in remote input-set

Update git-metadata in remote input-set and return the updated input-set

Securityx-api-key
Request
path Parameters
inputSetIdentifier
required
string

Identifier for the Input Set

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 for the entity.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

repoName
string

Name of the repository.

filePath
string

File Path of the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns identifier of updated input-set

put/pipeline/api/inputSets/{inputSetIdentifier}/update-git-metadata
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}