Input Sets [Beta]

This contains APIs for Input Sets.

Create an Input Set

Creates an Input Set for a Pipeline.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema:
required

Input Set create request body.

input_set_yaml
required
string

Input Set YAML (to be passed as a String).

identifier
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$

Input Set identifier

name
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z-_ ]{0,127}$

Input Set name

description
string <= 1024 characters

Input Set description

object <= 128 properties

Input Set tags

object (Create Git Details)

Contains parameters related to creating an Entity for Git Experience.

Responses
201

Input Set response body

post/v1/orgs/{org}/projects/{project}/input-sets
Request samples
{
  • "input_set_yaml": "inputSet:\n pipeline:\n identifier: Example_Pipeline\n stages:\n - stage:\n identifier: Example_Stage\n type: Approval\n spec:\n execution:\n steps:\n - step:\n identifier: Approval_Step\n type: HarnessApproval\n spec:\n approvers:\n userGroups:\n - account.Admins\n - step:\n identifier: Shellscript_Step\n type: ShellScript\n spec:\n source:\\n type: Inline\n spec:\\n script: echo \"ShellScript\"\n - stage:\n identifier: Sample_Deploy_Stage\n type: Deployment\n spec:\n serviceConfig:\n serviceRef: Service1\n infrastructure:\n environmentRef: Env1\n infrastructureDefinition:\n type: KubernetesDirect\n spec:\n connectorRef: account.harnessciplatform\n namespace: sample",
  • "identifier": "example_input_set",
  • "name": "ExampleInputSet",
  • "description": "Input Set Description",
  • "tags": {
    },
  • "git_details": {
    }
}
Response samples
{
  • "input_set_yaml": "example_input_set_yaml",
  • "identifier": "example_input_set",
  • "name": "Example Input Set",
  • "org": "example_org",
  • "project": "example_project",
  • "description": "InputSet Description",
  • "tags": {
    },
  • "git_details": {
    },
  • "created": 1234567890,
  • "updated": 9876543210,
  • "error_details": {
    }
}

List Input Sets

Returns a List of Input Sets for a Pipeline.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

page
integer
Default: 0

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items on each page.

limit
integer <= 100
Default: 30

Pagination: Number of items to return.

search_term
string

This would be used to filter resources having attributes matching the search term.

sort
string

Parameter on the basis of which sorting is done.

Enum: "name" "updated"
order
string

Order on the basis of which sorting is done.

Enum: "ASC" "DESC"
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Responses
200

Input Set response body

get/v1/orgs/{org}/projects/{project}/input-sets
Request samples
Response samples
[
  • {
    }
]

Retrieve an Input Set

Retrieves an Input Set for a Pipeline.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

branch_name
string

Name of the branch (for Git Experience).

parent_entity_connector_ref
string

Connector reference for Parent Entity (Pipeline).

parent_entity_repo_name
string

Repository name for Parent Entity (Pipeline).

load_from_fallback_branch
boolean
Default: "false"

Flag to load the pipeline from the created non default branch

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Load-From-Cache
string
Default: false

Specifies whether the remote pipeline should be loaded from Git or Git cache.

Responses
200

Input Set response body

get/v1/orgs/{org}/projects/{project}/input-sets/{input-set}
Request samples
Response samples
{
  • "input_set_yaml": "example_input_set_yaml",
  • "identifier": "example_input_set",
  • "name": "Example Input Set",
  • "org": "example_org",
  • "project": "example_project",
  • "description": "InputSet Description",
  • "tags": {
    },
  • "git_details": {
    },
  • "created": 1234567890,
  • "updated": 9876543210,
  • "error_details": {
    }
}

Update an Input Set

Updates an Input Set for a Pipeline.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema:
required

Input Set update request body

input_set_yaml
required
string

Input Set YAML (to be passed as a String).

identifier
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$

Input Set identifier

name
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z-_ ]{0,127}$

Input Set name

description
string <= 1024 characters

Input Set description

object <= 128 properties

Input Set tags

object (InputSetGitUpdateDetails)

Contains parameters related to updating an Input Set for Git Experience.

Responses
200

Input Set response body

put/v1/orgs/{org}/projects/{project}/input-sets/{input-set}
Request samples
{
  • "input_set_yaml": "inputSet:\n pipeline:\n identifier: Example_Pipeline\n stages:\n - stage:\n identifier: Example_Stage\n type: Approval\n spec:\n execution:\n steps:\n - step:\n identifier: Approval_Step\n type: HarnessApproval\n spec:\n approvers:\n userGroups:\n - account.Admins\n - step:\n identifier: Shellscript_Step\n type: ShellScript\n spec:\n source:\\n type: Inline\n spec:\\n script: echo \"ShellScript\"\n - stage:\n identifier: Sample_Deploy_Stage\n type: Deployment\n spec:\n serviceConfig:\n serviceRef: Service1\n infrastructure:\n environmentRef: Env1\n infrastructureDefinition:\n type: KubernetesDirect\n spec:\n connectorRef: account.harnessciplatform\n namespace: sample",
  • "identifier": "example_input_set",
  • "name": "ExampleInputSet",
  • "description": "Input Set Description",
  • "tags": {
    },
  • "git_details": {
    }
}
Response samples
{
  • "input_set_yaml": "example_input_set_yaml",
  • "identifier": "example_input_set",
  • "name": "Example Input Set",
  • "org": "example_org",
  • "project": "example_project",
  • "description": "InputSet Description",
  • "tags": {
    },
  • "git_details": {
    },
  • "created": 1234567890,
  • "updated": 9876543210,
  • "error_details": {
    }
}

Delete an Input Set

Deletes an Input Set for a Pipeline.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Responses
204

No Content

400

Bad Request

delete/v1/orgs/{org}/projects/{project}/input-sets/{input-set}
Request samples
Response samples
{ }

Move InputSet YAML from inline to remote

Creates a remote entity by fetching the input set YAML from Harness.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema: application/json
object (Move Git Details)

Parameters related to moving an entity for Git Experience.

pipeline_identifier
string
input_set_identifier
string
move_config_operation_type
string (MoveConfigOperationType)

Operation type to move the configuration

Value: "INLINE_TO_REMOTE"
Responses
200

Response body for moving an input set configuration.

post/v1/orgs/{org}/projects/{project}/input-sets/{input-set}/move-config
Request samples
application/json
{
  • "git_details": {
    },
  • "pipeline_identifier": "string",
  • "input_set_identifier": "string",
  • "move_config_operation_type": "INLINE_TO_REMOTE"
}
Response samples
application/json
{
  • "input_set_identifier": "string"
}

Get Input Set YAML from Git Repository

Fetches InputSet YAML from Git Repository and saves a record for it in Harness

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema: application/json

Input Set import request body

object (Import Git Information)

Parameters related to importing an entity for Git.

object (InputSet Import Request DTO)

Information of InputSet import request DTO

Responses
200

Response body for input set import.

post/v1/orgs/{org}/projects/{project}/input-sets/{input-set}/import
Request samples
application/json
{
  • "git_import_info": {
    },
  • "input_set_import_request": {
    }
}
Response samples
application/json
{
  • "input_set_identifier": "string"
}

Update GitMetadata for Remote InputSet

Update git-metadata in remote inputSet and return the updated inputSet

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

input-set
required
string

Input Set identifier

query Parameters
pipeline
required
string

Pipeline identifier for the Input Set.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema: application/json
connector_ref
string

Harness connector id used for entity CRUD operations

repo_name
string

Name of the repository.

file_path
string

File path of the entity in the repository.

Responses
200

Example response

put/v1/orgs/{org}/projects/{project}/input-sets/{input-set}/git-metadata
Request samples
application/json
{
  • "connector_ref": "string",
  • "repo_name": "string",
  • "file_path": "string"
}
Response samples
application/json
{
  • "entity_identifier": "string"
}