Returns a list of Pipelines.
Response body for List Pipelines.
[- {
- "identifier": "example_pipeline",
- "name": "Example Pipeline",
- "description": "This is an Example Pipeline",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "created": 1234567890,
- "updated": 1234567890,
- "modules": [
- "CD"
], - "recent_execution_info": [
- {
- "executor_info": {
- "trigger_type": "NOOP",
- "username": "harness_user",
- "email": "noreply@harness.io"
}, - "execution_id": "example_execution_identifier",
- "execution_status": "Running",
- "started": 1234567890,
- "ended": 1234567890,
- "run_number": 5,
- "parent_stage_info": {
- "has_parent_pipeline": true,
- "execution_id": "example_parent_execution_identifier",
- "identifier": "example_parent_pipeline_id",
- "project_id": "example_project_id",
- "org_id": "example_org_id",
- "run_sequence": 12671687,
- "stage_node_id": "example_stage_node_id"
}
}
], - "store_type": "REMOTE",
- "connector_ref": "example_connector",
- "valid": true,
- "git_details": {
- "object_id": "example_object",
- "branch_name": "branch",
- "file_path": "/folder/file.json",
- "repo_name": "example_repository",
- "commit_id": "abcd123",
- "file_url": "www.repo/folder/file.com",
- "repo_url": "www.repo.com"
}
}
]
Creates a Pipeline.
Pipeline request body
Pipeline response body
{- "pipeline_yaml": "pipeline:\n identifier: example_pipeline\n name: ExamplePipeline\n allowStageExecutions: false\n stages:\n - stage:\n name: Example Build Stage\n identifier: example_build_stage\n description: ''\n type: Approval\n spec:\n execution:\n steps:\n - step:\n name: Approval Step\n identifier: Approval_Step\n type: HarnessApproval\n timeout: 1d\n spec:\n approvalMessage: |-\n Please review the following information\n and approve the pipeline progression\n includePipelineExecutionHistory: true\n approvers:\n minimumCount: 1\n disallowPipelineExecutor: false\n userGroups: <+input>\n approverInputs: []\n - step:\n type: ShellScript\n name: ShellScript Step\n identifier: ShellScript_Step\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: <+input>\n environmentVariables: []\n outputVariables: []\n executionTarget: {}\n timeout: 10m\n tags: {}\n - stage:\n name: Example Deploy Stage\n identifier: example_deploy_stage\n description: ''\n type: Deployment\n spec:\n serviceConfig:\n serviceRef: <+input>\n serviceDefinition:\n spec:\n variables: []\n type: Kubernetes\n infrastructure:\n environmentRef: <+input>\n infrastructureDefinition:\n type: KubernetesDirect\n spec:\n connectorRef: <+input>\n namespace: <+input>\n releaseName: release-<+INFRA_KEY>\n allowSimultaneousDeployments: false\n execution:\n steps:\n - step:\n name: Rollout Deployment\n identifier: rolloutDeployment\n type: K8sRollingDeploy\n timeout: 10m\n spec:\n skipDryRun: false\n rollbackSteps:\n - step:\n name: Rollback Rollout Deployment\n identifier: rollbackRolloutDeployment\n type: K8sRollingRollback\n timeout: 10m\n spec: {}\n tags: {}\n failureStrategies:\n - onFailure:\n errors:\n - AllErrors\n action:\n type: StageRollback\n",
- "identifier": "example_pipeline",
- "name": "ExamplePipeline",
- "description": "Pipeline Description",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "git_details": {
- "branch_name": "branch",
- "file_path": "/folder/file.json",
- "commit_message": "Added Harness Git Experience",
- "base_branch": "old_branch",
- "connector_ref": "git_connector",
- "store_type": "REMOTE",
- "repo_name": "example_repository"
}
}
{- "identifier": "example_pipeline"
}
Retrieves a Pipeline.
Pipeline response body
{- "pipeline_yaml": "example_yaml_text",
- "template_applied_pipeline_yaml": "example_yaml_text_with_template",
- "identifier": "example_pipeline",
- "name": "ExamplePipeline",
- "org": "example_org",
- "project": "example_project",
- "description": "Pipeline Description",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "modules": [
- "cd"
], - "git_details": {
- "object_id": "example_object",
- "branch_name": "branch",
- "file_path": "/folder/file.json",
- "repo_name": "example_repository",
- "commit_id": "abcd123",
- "file_url": "www.repo/folder/file.com",
- "repo_url": "www.repo.com"
}, - "valid": true,
- "yaml_error_wrapper": {
- "message": "something is incorrect",
- "message_fqn": "something is incorrect at pipeline.name",
- "stage_info": {
- "identifier": "example_stage",
- "type": "stage",
- "name": "Example Stage",
- "fqn": "pipeline.stages.stage"
}, - "step_info": {
- "identifier": "example_step",
- "type": "string",
- "name": "string",
- "fqn": "pipeline.steps.step"
}, - "fqn": "pipeline.name",
- "hint_message": "try changing something"
}, - "cache_response_metadata": {
- "cache_state": "VALID_CACHE",
- "ttl_left": 9223372036854776000,
- "last_updated_at": 9223372036854776000
}, - "created": 1234567890,
- "updated": 1234567890
}
Updates a Pipeline.
Pipeline request body
Pipeline response body
{- "pipeline_yaml": "pipeline:\n identifier: example_pipeline\n name: ExamplePipeline\n allowStageExecutions: false\n stages:\n - stage:\n name: Example Build Stage\n identifier: example_build_stage\n description: ''\n type: Approval\n spec:\n execution:\n steps:\n - step:\n name: Approval Step\n identifier: Approval_Step\n type: HarnessApproval\n timeout: 1d\n spec:\n approvalMessage: |-\n Please review the following information\n and approve the pipeline progression\n includePipelineExecutionHistory: true\n approvers:\n minimumCount: 1\n disallowPipelineExecutor: false\n userGroups: <+input>\n approverInputs: []\n - step:\n type: ShellScript\n name: ShellScript Step\n identifier: ShellScript_Step\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: <+input>\n environmentVariables: []\n outputVariables: []\n executionTarget: {}\n timeout: 10m\n tags: {}\n - stage:\n name: Example Deploy Stage\n identifier: example_deploy_stage\n description: ''\n type: Deployment\n spec:\n serviceConfig:\n serviceRef: <+input>\n serviceDefinition:\n spec:\n variables: []\n type: Kubernetes\n infrastructure:\n environmentRef: <+input>\n infrastructureDefinition:\n type: KubernetesDirect\n spec:\n connectorRef: <+input>\n namespace: <+input>\n releaseName: release-<+INFRA_KEY>\n allowSimultaneousDeployments: false\n execution:\n steps:\n - step:\n name: Rollout Deployment\n identifier: rolloutDeployment\n type: K8sRollingDeploy\n timeout: 10m\n spec:\n skipDryRun: false\n rollbackSteps:\n - step:\n name: Rollback Rollout Deployment\n identifier: rollbackRolloutDeployment\n type: K8sRollingRollback\n timeout: 10m\n spec: {}\n tags: {}\n failureStrategies:\n - onFailure:\n errors:\n - AllErrors\n action:\n type: StageRollback\n",
- "identifier": "example_pipeline",
- "name": "ExamplePipeline",
- "description": "Pipeline Description",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "git_details": {
- "branch_name": "branch",
- "commit_message": "Added Harness Git Experience",
- "last_object_id": "abcdXYZ",
- "base_branch": "old_branch",
- "last_commit_id": "abcdXYZ",
- "connector_ref": "git_connector",
- "store_type": "REMOTE",
- "repo_name": "example_repository"
}
}
{- "identifier": "example_pipeline"
}
Patch API for pipeline
Pipeline response body
{- "pipeline_yaml": "string",
- "name": "string",
- "desc": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "git_details": {
- "branch_name": "string",
- "commit_message": "string",
- "last_object_id": "string",
- "base_branch": "string",
- "last_commit_id": "string",
- "connector_ref": "string",
- "store_type": "INLINE",
- "repo_name": "string",
- "file_path": "string"
}, - "version": "string"
}
{- "identifier": "example_pipeline"
}
Creates a remote entity by fetching pipeline YAML from Harness.
Response body for moving a pipeline configuration.
{- "git_details": {
- "branch_name": "string",
- "file_path": "string",
- "commit_message": "string",
- "base_branch": "string",
- "connector_ref": "string",
- "repo_name": "string"
}, - "pipeline_identifier": "string",
- "move_config_operation_type": "INLINE_TO_REMOTE"
}
{- "pipeline_identifier": "string"
}
Fetches Pipeline YAML from Git Repository and saves a record for it in Harness
Pipeline import request body
object (Import Git Information) Parameters related to importing an entity for Git. | |
object (Pipeline Import Request DTO) Information of Pipeline import request DTO |
Response body for pipeline save.
{- "git_import_info": {
- "connector_ref": "string",
- "repo_name": "string",
- "branch_name": "string",
- "file_path": "string",
- "is_force_import": true
}, - "pipeline_import_request": {
- "pipeline_name": "string",
- "pipeline_description": "string"
}
}
{- "identifier": "string",
- "governance_metadata": [
- {
- "identifier": "string",
- "deny": true,
- "policy_set_metadata": [
- {
- "policy_set_identifier": "string",
- "deny": true,
- "policy_metadata": [
- {
- "policy_identifier": "string",
- "policy_name": "string",
- "severity": "string",
- "deny_messages": [
- null
], - "status": "string",
- "identifier": "string",
- "account_identifier": "string",
- "org_identifier": "string",
- "project_identifier": "string",
- "created": 0,
- "updated": 0,
- "error": "string"
}
], - "policy_set": "string",
- "status": "string",
- "identifier": "string",
- "created": 0,
- "account_identifier": "string",
- "org_identifier": "string",
- "project_identifier": "string"
}
], - "message": "string",
- "time_stamp": 0,
- "status": "string",
- "account_identifier": "string",
- "org_identifier": "string",
- "project_identifier": "string",
- "entity": "string",
- "type": "string",
- "action": "string",
- "created": 0
}
]
}
Update git-metadata in remote pipeline
Example response
{- "connector_ref": "string",
- "repo_name": "string",
- "file_path": "string"
}
{- "entity_identifier": "string"
}