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: qbo
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: kle
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Vel perferendis culpa iure non.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 7
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: 9n3
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: v
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Maiores laborum autem quibusdam ut.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: z
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": "w",
  • "kind": "tf",
  • "value": "Id inventore et vel dolores quia magni.",
  • "value_type": "string"
}
Response samples
application/json
{
  • "account": "ogi",
  • "created": 5431443114581221000,
  • "key": "7",
  • "kind": "tf",
  • "org": "nvg",
  • "policy_evaluation": {
    },
  • "project": "m",
  • "updated": 8735968129367883000,
  • "value": "Ipsam aut recusandae occaecati laborum natus ad.",
  • "value_type": "secret",
  • "workspace": "Nihil ex et consequatur id sint quam."
}

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: v
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: b
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Voluptatem iusto consequatur dicta libero.
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: 9
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: qdp
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: agp
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: b
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Ad voluptas iure eos omnis.
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: p98
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: u
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": "y4",
  • "created": 1635700156985383700,
  • "key": "az1",
  • "kind": "env",
  • "org": "h",
  • "project": "f",
  • "updated": 654322215086363800,
  • "value": "Unde aspernatur omnis nobis ut.",
  • "value_type": "string",
  • "workspace": "Sed officiis ratione debitis."
}

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: 30d
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: sa
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Quos doloremque.
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: vbi
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 1c
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": "Perspiciatis distinctio in asperiores id saepe.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}