For the complete documentation index, see llms.txt. This page is also available as Markdown.

Clone workspace

Clone the given workspace with new name.

post
Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: wcg
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 1
workspacestringRequiredExample: Asperiores in quas ut.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: gbx
Body
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: r0Pattern: ^[A-Za-z_][A-Za-z0-9_-]*$
namestring · min: 1 · max: 128Required

Name is the human readable name for the resource.

Example: resource namePattern: ^[A-Za-z_][A-Za-z0-9_ -]*$
Responses
200

OK response.

application/json

Create-WorkspaceResponseBody result type (default view)

post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone HTTP/1.1
Host: localhost:80
Harness-Account: gbx
Content-Type: application/json
Accept: */*
Content-Length: 41

{
  "identifier": "2",
  "name": "resource name"
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      }
    ],
    "entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "id": 123,
    "input": "",
    "org_id": "test-org",
    "project_id": "test-project",
    "status": "error",
    "type": "pipeline,service"
  }
}

Last updated

Was this helpful?