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

Variables

Variables Service handles the API for managing workspace variables.

List workspace variables

get

List all workspace variables.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 23o
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Est qui voluptatem corporis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 9z
Responses
200

OK response.

application/json

WorkspaceVariableResource is the representation for a single environment variable associated with a workspace.

accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: gd
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 7946127455803514000
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: 190Pattern: ^[a-zA-Z0-9_]+$
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: tfPossible values:
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

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

Project is the project identifier.

Example: a
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 4885809976085566000
valuestringRequired

Value is the value of the secret.

Example: Aspernatur ut.
value_typestring · enumRequired

Type indicates the value type of the variable. In the case of secret this is a reference to an item in the secret store. Boolean values must be "true" or "false". JSON values must be valid JSON.

Example: numberPossible values:
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Sed unde ipsa omnis voluptatem.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables HTTP/1.1
Host: localhost:80
Harness-Account: 9z
Accept: */*
[
  {
    "account": "b",
    "created": 3556087426414383600,
    "key": "as",
    "kind": "tf",
    "org": "lfd",
    "project": "1v5",
    "updated": 993187508608752300,
    "value": "Sequi et est dicta eos.",
    "value_type": "string",
    "workspace": "In et atque dolorum officia ut ex."
  },
  {
    "account": "b",
    "created": 3556087426414383600,
    "key": "as",
    "kind": "tf",
    "org": "lfd",
    "project": "1v5",
    "updated": 993187508608752300,
    "value": "Sequi et est dicta eos.",
    "value_type": "string",
    "workspace": "In et atque dolorum officia ut ex."
  },
  {
    "account": "b",
    "created": 3556087426414383600,
    "key": "as",
    "kind": "tf",
    "org": "lfd",
    "project": "1v5",
    "updated": 993187508608752300,
    "value": "Sequi et est dicta eos.",
    "value_type": "string",
    "workspace": "In et atque dolorum officia ut ex."
  },
  {
    "account": "b",
    "created": 3556087426414383600,
    "key": "as",
    "kind": "tf",
    "org": "lfd",
    "project": "1v5",
    "updated": 993187508608752300,
    "value": "Sequi et est dicta eos.",
    "value_type": "string",
    "workspace": "In et atque dolorum officia ut ex."
  }
]

Create workspace variable

post

Creates a new workspace variable

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 03d
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Voluptatum temporibus recusandae.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: e3
Body
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: k2Pattern: ^[a-zA-Z0-9_]+$
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: envPossible values:
valuestringRequired

Value is the value of the secret.

Example: Incidunt sit adipisci distinctio non sint.
value_typestring · enumRequired

Type indicates the value type of the variable. In the case of secret this is a reference to an item in the secret store. Boolean values must be "true" or "false". JSON values must be valid JSON.

Example: numberPossible values:
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: any
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 5568966581855160000
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: g0Pattern: ^[a-zA-Z0-9_]+$
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: tfPossible values:
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 94c
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: e
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 6590479016413705000
valuestringRequired

Value is the value of the secret.

Example: Qui placeat autem.
value_typestring · enumRequired

Type indicates the value type of the variable. In the case of secret this is a reference to an item in the secret store. Boolean values must be "true" or "false". JSON values must be valid JSON.

Example: jsonPossible values:
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Laboriosam est doloremque ut.
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables HTTP/1.1
Host: localhost:80
Harness-Account: e3
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "key": "6i",
  "kind": "env",
  "value": "Et ut deserunt.",
  "value_type": "json"
}
{
  "account": "4o",
  "created": 631341020148062200,
  "key": "maa",
  "kind": "tf",
  "org": "e6",
  "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"
  },
  "project": "g9",
  "updated": 5241337494763665000,
  "value": "Veniam consequatur aliquid quis voluptas.",
  "value_type": "boolean",
  "workspace": "Ullam sunt nesciunt qui et quam ex."
}

Show workspace variable

get

Show an individual workspace variable.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 9tg
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Commodi qui et officiis exercitationem.
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: tfPossible values:
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: hvPattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5q
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: i
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 2717358077412208600
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: um4Pattern: ^[a-zA-Z0-9_]+$
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: envPossible values:
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

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

Project is the project identifier.

Example: ch
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 1168778063002462200
valuestringRequired

Value is the value of the secret.

Example: Consequatur maxime quia beatae natus.
value_typestring · enumRequired

Type indicates the value type of the variable. In the case of secret this is a reference to an item in the secret store. Boolean values must be "true" or "false". JSON values must be valid JSON.

Example: secretPossible values:
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Debitis aut eum qui.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} HTTP/1.1
Host: localhost:80
Harness-Account: 5q
Accept: */*
{
  "account": "yj",
  "created": 6240630386684560000,
  "key": "hny",
  "kind": "tf",
  "org": "5b",
  "project": "ro",
  "updated": 3163900774644598300,
  "value": "Atque est aliquam sint libero et reiciendis.",
  "value_type": "string",
  "workspace": "Saepe repellat."
}

Update workspace variable

put

Updates the given workspace variable with new info.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: wd
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Aperiam veniam voluptas.
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: envPossible values:
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: 3Pattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 2x6
Body
valuestringRequired

Value is the value of the secret.

Example: Voluptatem laboriosam.
value_typestring · enumRequired

Type indicates the value type of the variable. In the case of secret this is a reference to an item in the secret store. Boolean values must be "true" or "false". JSON values must be valid JSON.

Example: booleanPossible values:
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} HTTP/1.1
Host: localhost:80
Harness-Account: 2x6
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "value": "Sit saepe ducimus illo aut.",
  "value_type": "json"
}
{
  "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"
  }
}

Destroy workspace variable

delete

Deletes the given workspace variable.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: g
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Placeat et.
kindstring · enumRequired

Kind is the classfcation of the variable.

Example: tfPossible values:
keystring · min: 1 · max: 128Required

Key is the identifier for the secret.

Example: n0Pattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8qb
Responses
200

OK response.

application/json
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} HTTP/1.1
Host: localhost:80
Harness-Account: 8qb
Accept: */*
{
  "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"
  }
}

Get variables, provider connectors, and variable files

get

Returns all terraform/environment variables, provider connectors, and variable files for a workspace

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: qi
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Esse sit minus vel.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 2d7
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/merged
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/merged HTTP/1.1
Host: localhost:80
Harness-Account: 2d7
Accept: */*
{
  "environment_variables": [
    {
      "associatedTemplate": "Eveniet eum eligendi in laborum.",
      "associatedVariableSet": "Enim ut deserunt dignissimos.",
      "created": 5543865558800733000,
      "inUse": false,
      "includeInWorkspace": false,
      "isLocked": false,
      "key": "Quidem velit sed excepturi vel.",
      "kind": "Eveniet non nam eligendi voluptatum.",
      "permissions": {
        "canDelete": true,
        "canEditKey": false,
        "canEditValue": false,
        "canEditValueType": true
      },
      "source": "workspace",
      "updated": 6546399137932857000,
      "uuid": "Quas temporibus.",
      "value": "Officia quos.",
      "value_type": "Qui in ut omnis."
    },
    {
      "associatedTemplate": "Eveniet eum eligendi in laborum.",
      "associatedVariableSet": "Enim ut deserunt dignissimos.",
      "created": 5543865558800733000,
      "inUse": false,
      "includeInWorkspace": false,
      "isLocked": false,
      "key": "Quidem velit sed excepturi vel.",
      "kind": "Eveniet non nam eligendi voluptatum.",
      "permissions": {
        "canDelete": true,
        "canEditKey": false,
        "canEditValue": false,
        "canEditValueType": true
      },
      "source": "workspace",
      "updated": 6546399137932857000,
      "uuid": "Quas temporibus.",
      "value": "Officia quos.",
      "value_type": "Qui in ut omnis."
    }
  ],
  "provider_connectors": [
    {
      "associatedTemplate": "Nostrum aut asperiores.",
      "associatedVariableSet": "Omnis repellendus neque dolorum voluptas sint similique.",
      "connector_ref": "Voluptatem animi id vero.",
      "created": 8566220096492955000,
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true
      },
      "source": "workspace",
      "type": "gcp",
      "updated": 3237386332751913000,
      "uuid": "Qui beatae excepturi."
    },
    {
      "associatedTemplate": "Nostrum aut asperiores.",
      "associatedVariableSet": "Omnis repellendus neque dolorum voluptas sint similique.",
      "connector_ref": "Voluptatem animi id vero.",
      "created": 8566220096492955000,
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true
      },
      "source": "workspace",
      "type": "gcp",
      "updated": 3237386332751913000,
      "uuid": "Qui beatae excepturi."
    }
  ],
  "terraform_variables": [
    {
      "associatedTemplate": "Eveniet eum eligendi in laborum.",
      "associatedVariableSet": "Enim ut deserunt dignissimos.",
      "created": 5543865558800733000,
      "inUse": false,
      "includeInWorkspace": false,
      "isLocked": false,
      "key": "Quidem velit sed excepturi vel.",
      "kind": "Eveniet non nam eligendi voluptatum.",
      "permissions": {
        "canDelete": true,
        "canEditKey": false,
        "canEditValue": false,
        "canEditValueType": true
      },
      "source": "workspace",
      "updated": 6546399137932857000,
      "uuid": "Quas temporibus.",
      "value": "Officia quos.",
      "value_type": "Qui in ut omnis."
    },
    {
      "associatedTemplate": "Eveniet eum eligendi in laborum.",
      "associatedVariableSet": "Enim ut deserunt dignissimos.",
      "created": 5543865558800733000,
      "inUse": false,
      "includeInWorkspace": false,
      "isLocked": false,
      "key": "Quidem velit sed excepturi vel.",
      "kind": "Eveniet non nam eligendi voluptatum.",
      "permissions": {
        "canDelete": true,
        "canEditKey": false,
        "canEditValue": false,
        "canEditValueType": true
      },
      "source": "workspace",
      "updated": 6546399137932857000,
      "uuid": "Quas temporibus.",
      "value": "Officia quos.",
      "value_type": "Qui in ut omnis."
    },
    {
      "associatedTemplate": "Eveniet eum eligendi in laborum.",
      "associatedVariableSet": "Enim ut deserunt dignissimos.",
      "created": 5543865558800733000,
      "inUse": false,
      "includeInWorkspace": false,
      "isLocked": false,
      "key": "Quidem velit sed excepturi vel.",
      "kind": "Eveniet non nam eligendi voluptatum.",
      "permissions": {
        "canDelete": true,
        "canEditKey": false,
        "canEditValue": false,
        "canEditValueType": true
      },
      "source": "workspace",
      "updated": 6546399137932857000,
      "uuid": "Quas temporibus.",
      "value": "Officia quos.",
      "value_type": "Qui in ut omnis."
    }
  ],
  "variable_files": [
    {
      "associatedTemplate": "Libero quibusdam non quis.",
      "associatedVariableSet": "Unde saepe aliquid fuga eaque.",
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true,
        "canEdit": false
      },
      "repository": "Occaecati et et quam consectetur.",
      "repository_branch": "Provident id quo ut distinctio.",
      "repository_commit": "Sunt vitae cupiditate nihil.",
      "repository_connector": "Enim ut delectus natus.",
      "repository_path": "Adipisci quaerat quibusdam voluptas.",
      "repository_sha": "Reiciendis adipisci enim aspernatur tenetur.",
      "source": "workspace",
      "uuid": "Delectus eum laboriosam."
    },
    {
      "associatedTemplate": "Libero quibusdam non quis.",
      "associatedVariableSet": "Unde saepe aliquid fuga eaque.",
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true,
        "canEdit": false
      },
      "repository": "Occaecati et et quam consectetur.",
      "repository_branch": "Provident id quo ut distinctio.",
      "repository_commit": "Sunt vitae cupiditate nihil.",
      "repository_connector": "Enim ut delectus natus.",
      "repository_path": "Adipisci quaerat quibusdam voluptas.",
      "repository_sha": "Reiciendis adipisci enim aspernatur tenetur.",
      "source": "workspace",
      "uuid": "Delectus eum laboriosam."
    },
    {
      "associatedTemplate": "Libero quibusdam non quis.",
      "associatedVariableSet": "Unde saepe aliquid fuga eaque.",
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true,
        "canEdit": false
      },
      "repository": "Occaecati et et quam consectetur.",
      "repository_branch": "Provident id quo ut distinctio.",
      "repository_commit": "Sunt vitae cupiditate nihil.",
      "repository_connector": "Enim ut delectus natus.",
      "repository_path": "Adipisci quaerat quibusdam voluptas.",
      "repository_sha": "Reiciendis adipisci enim aspernatur tenetur.",
      "source": "workspace",
      "uuid": "Delectus eum laboriosam."
    },
    {
      "associatedTemplate": "Libero quibusdam non quis.",
      "associatedVariableSet": "Unde saepe aliquid fuga eaque.",
      "inUse": false,
      "isInWorkspace": true,
      "isLocked": true,
      "permissions": {
        "canDelete": true,
        "canEdit": false
      },
      "repository": "Occaecati et et quam consectetur.",
      "repository_branch": "Provident id quo ut distinctio.",
      "repository_commit": "Sunt vitae cupiditate nihil.",
      "repository_connector": "Enim ut delectus natus.",
      "repository_path": "Adipisci quaerat quibusdam voluptas.",
      "repository_sha": "Reiciendis adipisci enim aspernatur tenetur.",
      "source": "workspace",
      "uuid": "Delectus eum laboriosam."
    }
  ]
}

Last updated

Was this helpful?