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: qox
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: tf4
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Architecto voluptatum minima vel sit ut.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: c1
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: 2wz
createdinteger · int64Required

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

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

Key is the identifier for the secret.

Example: f7mPattern: ^[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: ezy
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: tg
updatedinteger · int64Required

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

Example: 7831993681402248000
valuestringRequired

Value is the value of the secret.

Example: Ipsa nostrum aut.
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: stringPossible values:
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Velit quod dolor sed soluta maiores.
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: c1
Accept: */*
[
  {
    "account": "36",
    "created": 58120768662255090,
    "key": "p",
    "kind": "env",
    "org": "9",
    "project": "fc",
    "updated": 8463692916017420000,
    "value": "Quisquam ut.",
    "value_type": "number",
    "workspace": "Aperiam est et aut temporibus."
  },
  {
    "account": "36",
    "created": 58120768662255090,
    "key": "p",
    "kind": "env",
    "org": "9",
    "project": "fc",
    "updated": 8463692916017420000,
    "value": "Quisquam ut.",
    "value_type": "number",
    "workspace": "Aperiam est et aut temporibus."
  },
  {
    "account": "36",
    "created": 58120768662255090,
    "key": "p",
    "kind": "env",
    "org": "9",
    "project": "fc",
    "updated": 8463692916017420000,
    "value": "Quisquam ut.",
    "value_type": "number",
    "workspace": "Aperiam est et aut temporibus."
  },
  {
    "account": "36",
    "created": 58120768662255090,
    "key": "p",
    "kind": "env",
    "org": "9",
    "project": "fc",
    "updated": 8463692916017420000,
    "value": "Quisquam ut.",
    "value_type": "number",
    "workspace": "Aperiam est et aut temporibus."
  }
]

Create workspace variable

post

Creates a new workspace variable

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: r
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Sed consequatur enim.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

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

Key is the identifier for the secret.

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

Kind is the classfcation of the variable.

Example: tfPossible values:
valuestringRequired

Value is the value of the secret.

Example: Mollitia non inventore minima.
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:
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: y3
createdinteger · int64Required

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

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

Key is the identifier for the secret.

Example: dPattern: ^[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: ejp
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: sn
updatedinteger · int64Required

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

Example: 3524266782302425600
valuestringRequired

Value is the value of the secret.

Example: Voluptatem voluptatem aut.
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: Et est blanditiis tempora animi porro omnis.
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: oa7
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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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: l6r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: o
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Voluptas qui voluptas sunt quia itaque.
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: toPattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: p
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: y
createdinteger · int64Required

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

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

Key is the identifier for the secret.

Example: jp9Pattern: ^[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: aor
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: h
updatedinteger · int64Required

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

Example: 6032128892445528000
valuestringRequired

Value is the value of the secret.

Example: Culpa nihil tenetur.
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: Dolores quos voluptatem dolorem.
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: p
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: 6
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 6k
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Ut vero.
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: nnmPattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: p
Body
valuestringRequired

Value is the value of the secret.

Example: Et ut ut aut exercitationem.
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: stringPossible 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: p
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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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: 3b
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: tt
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Et ex molestiae nemo sed impedit 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: ln6Pattern: ^[a-zA-Z0-9_]+$
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 3
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: 3
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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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: 253
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: h2h
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Dicta rem similique perspiciatis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8
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: 8
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?