Variables
Variables Service handles the API for managing workspace variables.
List all workspace variables.
Org is the organisation identifier.
fProject is the project identifier.
23oWorkspace is the resource workspace this variable is associated with.
Est qui voluptatem corporis.Account is the internal customer account ID.
9zOK response.
WorkspaceVariableResource is the representation for a single environment variable associated with a workspace.
Account is the internal customer account ID.
gdCreated is the unix timestamp at which the resource was originally created in milliseconds.
7946127455803514000Key is the identifier for the secret.
190Pattern: ^[a-zA-Z0-9_]+$Kind is the classfcation of the variable.
tfPossible values: Org is the organisation identifier.
dProject is the project identifier.
aModified is the unix timestamp at which the resource was last modified in milliseconds.
4885809976085566000Value is the value of the secret.
Aspernatur ut.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.
numberPossible values: Workspace is the resource workspace this variable is associated with.
Sed unde ipsa omnis voluptatem.BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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."
}
]Creates a new workspace variable
Org is the organisation identifier.
rc8Project is the project identifier.
03dWorkspace is the resource workspace this variable is associated with.
Voluptatum temporibus recusandae.Account is the internal customer account ID.
e3Key is the identifier for the secret.
k2Pattern: ^[a-zA-Z0-9_]+$Kind is the classfcation of the variable.
envPossible values: Value is the value of the secret.
Incidunt sit adipisci distinctio non sint.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.
numberPossible values: OK response.
Account is the internal customer account ID.
anyCreated is the unix timestamp at which the resource was originally created in milliseconds.
5568966581855160000Key is the identifier for the secret.
g0Pattern: ^[a-zA-Z0-9_]+$Kind is the classfcation of the variable.
tfPossible values: Org is the organisation identifier.
94cProject is the project identifier.
eModified is the unix timestamp at which the resource was last modified in milliseconds.
6590479016413705000Value is the value of the secret.
Qui placeat autem.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.
jsonPossible values: Workspace is the resource workspace this variable is associated with.
Laboriosam est doloremque ut.BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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 an individual workspace variable.
Org is the organisation identifier.
jl7Project is the project identifier.
9tgWorkspace is the resource workspace this variable is associated with.
Commodi qui et officiis exercitationem.Kind is the classfcation of the variable.
tfPossible values: Key is the identifier for the secret.
hvPattern: ^[a-zA-Z0-9_]+$Account is the internal customer account ID.
5qOK response.
Account is the internal customer account ID.
iCreated is the unix timestamp at which the resource was originally created in milliseconds.
2717358077412208600Key is the identifier for the secret.
um4Pattern: ^[a-zA-Z0-9_]+$Kind is the classfcation of the variable.
envPossible values: Org is the organisation identifier.
e02Project is the project identifier.
chModified is the unix timestamp at which the resource was last modified in milliseconds.
1168778063002462200Value is the value of the secret.
Consequatur maxime quia beatae natus.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.
secretPossible values: Workspace is the resource workspace this variable is associated with.
Debitis aut eum qui.BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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."
}Updates the given workspace variable with new info.
Org is the organisation identifier.
1r0Project is the project identifier.
wdWorkspace is the resource workspace this variable is associated with.
Aperiam veniam voluptas.Kind is the classfcation of the variable.
envPossible values: Key is the identifier for the secret.
3Pattern: ^[a-zA-Z0-9_]+$Account is the internal customer account ID.
2x6Value is the value of the secret.
Voluptatem laboriosam.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.
booleanPossible values: OK response.
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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"
}
}Deletes the given workspace variable.
Org is the organisation identifier.
ff2Project is the project identifier.
gWorkspace is the resource workspace this variable is associated with.
Placeat et.Kind is the classfcation of the variable.
tfPossible values: Key is the identifier for the secret.
n0Pattern: ^[a-zA-Z0-9_]+$Account is the internal customer account ID.
8qbOK response.
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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"
}
}Returns all terraform/environment variables, provider connectors, and variable files for a workspace
Org is the organisation identifier.
4Project is the project identifier.
qiWorkspace is the resource workspace this variable is associated with.
Esse sit minus vel.Account is the internal customer account ID.
2d7OK response.
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
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?