variables

Variables Service handles the API for managing workspace variables.

List workspace variables

List all workspace variables.

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: g
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: vo
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Voluptatem eos provident laborum enim.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: hlx
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

get/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

Create workspace variable

Creates a new workspace variable

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: uy
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: 71
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Rerum hic aut architecto.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: t8s
Request Body schema: application/json
required
key
required
string [ 1 .. 128 ] characters ^[a-zA-Z0-9_]+$

Key is the identifier for the secret.

kind
required
string

Kind is the classfcation of the variable.

Enum: "env" "tf"
value
required
string

Value is the value of the secret.

value_type
required
string

Type indecates the value type of the secret. In the case of secret this is a reference to an item in the secret store

Enum: "string" "secret"
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

post/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables
Request samples
application/json
{
  • "key": "eod",
  • "kind": "env",
  • "value": "Quo non.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "account": "f6f",
  • "created": 4350755749572364000,
  • "key": "0",
  • "kind": "env",
  • "org": "25",
  • "policy_evaluation": {
    },
  • "project": "g",
  • "updated": 5727525864746015000,
  • "value": "Illum voluptas possimus illo.",
  • "value_type": "secret",
  • "workspace": "Fugit unde ex sunt id hic."
}

Destroy workspace variable

Deletes the given workspace variable.

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: y
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: qu
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Iste aut ipsum non.
kind
required
string

Kind is the classfcation of the variable.

Enum: "env" "tf"
Example: tf
key
required
string [ 1 .. 128 ] characters ^[a-zA-Z0-9_]+$

Key is the identifier for the secret.

Example: 9
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 2
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

delete/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
Request samples
Response samples
application/json
{
  • "policy_evaluation": {
    }
}

Show workspace variable

Show an individual workspace variable.

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: 90
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: d7c
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Repellat illum itaque iusto dignissimos voluptates.
kind
required
string

Kind is the classfcation of the variable.

Enum: "env" "tf"
Example: env
key
required
string [ 1 .. 128 ] characters ^[a-zA-Z0-9_]+$

Key is the identifier for the secret.

Example: qfi
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 8h
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

get/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
Request samples
Response samples
application/json
{
  • "account": "i",
  • "created": 16655927404665218,
  • "key": "q",
  • "kind": "env",
  • "org": "o",
  • "project": "8",
  • "updated": 3254541156913407000,
  • "value": "Voluptas quis rerum et qui quod.",
  • "value_type": "string",
  • "workspace": "Est error inventore autem id."
}

Update workspace variable

Updates the given workspace variable with new info.

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: eyh
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: 1
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Omnis excepturi.
kind
required
string

Kind is the classfcation of the variable.

Enum: "env" "tf"
Example: tf
key
required
string [ 1 .. 128 ] characters ^[a-zA-Z0-9_]+$

Key is the identifier for the secret.

Example: zz
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: y
Request Body schema: application/json
required
value
required
string

Value is the value of the secret.

value_type
required
string

Type indecates the value type of the secret. In the case of secret this is a reference to an item in the secret store

Enum: "string" "secret"
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

put/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}
Request samples
application/json
{
  • "value": "Tempora ut sint hic dolore.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}

Get variables, provider connectors, and variable files

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

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: n
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: 0
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Ipsam deleniti quis iusto.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: ik
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

get/iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/merged
Request samples
Response samples
application/json
{
  • "environment_variables": [
    ],
  • "provider_connectors": [
    ],
  • "terraform_variables": [
    ],
  • "variable_files": [
    ]
}