Update Git details for multiple version.
Template GitMetadata response
[- {
- "version": "string",
- "git_details": {
- "file_path": "string",
- "repo_name": "string",
- "connector_ref": "string"
}
}
]
{- "status": true
}
Creates a Template in the Project scope.
Templates Create Request Body
Template Response Body
{- "template_yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "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": "INLINE",
- "repo_name": "example_repository"
}, - "is_stable": true,
- "comments": "sample_comment"
}
{- "account": "example_account",
- "org": "example_organization",
- "project": "example_project",
- "identifier": "example_template",
- "name": "Example_template",
- "description": "string",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "version_label": "example_version",
- "entity_type": "Stage",
- "child_type": "example_child_type",
- "scope": "org",
- "version": 1234567890,
- "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"
}, - "updated": 1234567890,
- "store_type": "INLINE",
- "connector_ref": "example_connector_ref",
- "stable_template": true
}
Retrieves list of Template with meta-data at Project scope.
Template Lists Meta Data Response
[- {
- "account": "example_account",
- "org": "example_organization",
- "project": "example_project",
- "identifier": "example_template",
- "name": "Example_template",
- "description": "string",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "version_label": "example_version",
- "entity_type": "Step",
- "child_type": "example_child_type",
- "scope": "org",
- "version": 1234567890,
- "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"
}, - "updated": 1234567890,
- "store_type": "INLINE",
- "connector_ref": "example_connector_ref",
- "stable_template": true
}
]
Retrieves stable version of Template at Project scope.
Template With Input reference
{- "template": {
- "account": "example_account",
- "org": "example_organization",
- "project": "example_project",
- "identifier": "example_template",
- "name": "Example_template",
- "description": "string",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "version_label": "example_version",
- "entity_type": "Stage",
- "child_type": "example_child_type",
- "scope": "org",
- "version": 1234567890,
- "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"
}, - "updated": 1234567890,
- "store_type": "INLINE",
- "connector_ref": "example_connector_ref",
- "stable_template": true
}, - "inputs": "example"
}
Retrieves particular version of Template at Project scope.
Template With Input reference
{- "template": {
- "account": "example_account",
- "org": "example_organization",
- "project": "example_project",
- "identifier": "example_template",
- "name": "Example_template",
- "description": "string",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "version_label": "example_version",
- "entity_type": "Stage",
- "child_type": "example_child_type",
- "scope": "org",
- "version": 1234567890,
- "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"
}, - "updated": 1234567890,
- "store_type": "INLINE",
- "connector_ref": "example_connector_ref",
- "stable_template": true
}, - "inputs": "example"
}
Updates particular version of Template at Project scope.
Templates Update Request Body
Template Response Body
{- "template_yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "git_details": {
- "branch_name": "branch",
- "commit_message": "Added Harness Git Experience",
- "last_object_id": "example_object_id",
- "base_branch": "old_branch",
- "connector_ref": "git_connector",
- "last_commit_id": "example_commit_id",
- "file_path": "/folder/file.json",
- "repo_name": "example_repository",
- "store_type": "INLINE"
}, - "comments": "sample_comments"
}
{- "account": "example_account",
- "org": "example_organization",
- "project": "example_project",
- "identifier": "example_template",
- "name": "Example_template",
- "description": "string",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "template:\n name: Example_template\n identifier: example_template\n versionLabel: v1\n type: Stage\n tags: {}\n spec:\n type: Custom\n spec:\n execution:\n steps:\n - step:\n type: ShellScript\n name: ss1\n identifier: ss1\n spec:\n shell: Bash\n onDelegate: true\n source:\n type: Inline\n spec:\n script: exit 1\n environmentVariables: []\n outputVariables: []\n timeout: 10m\n",
- "version_label": "example_version",
- "entity_type": "Stage",
- "child_type": "example_child_type",
- "scope": "org",
- "version": 1234567890,
- "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"
}, - "updated": 1234567890,
- "store_type": "INLINE",
- "connector_ref": "example_connector_ref",
- "stable_template": true
}
Updates the stable version of Template at Project scope.
Templates Fetch Request Body
Template stable version update Response
{- "branch_name": "branch",
- "parent_entity_connector_ref": "example_connector_ref",
- "parent_entity_repo_name": "example_repo_name",
- "parent_entity_account_id": "example_account_id",
- "parent_entity_org_id": "example_org_id",
- "parent_entity_project_id": "example_project_id",
- "comments": "sample_comments"
}
{- "stable_version": "example_version"
}
Import template at a project level
object (Git Import Details) Contains parameters related to importing an Entity for Git Experience. | |
object (Template Import Request DTO) Information of Tempalte import request DTO |
Example response
{- "git_import_details": {
- "connector_ref": "string",
- "repo_name": "string",
- "branch_name": "string",
- "file_path": "string",
- "is_force_import": true
}, - "template_import_request": {
- "template_name": "string",
- "template_version": "string",
- "template_description": "string"
}
}
{- "template_identifier": "string",
- "template_version": "string"
}