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

Project is the project identifier.

Example: xe
workspace
required
string

Workspace is the resource workspace this variable is associated with.

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

Account is the internal customer account ID.

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

Project is the project identifier.

Example: 819
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Veniam quos sunt dolorem.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: b
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": "qd",
  • "kind": "env",
  • "value": "Facilis quis molestiae.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "account": "8cj",
  • "created": 6190916726533635000,
  • "key": "4",
  • "kind": "tf",
  • "org": "msj",
  • "policy_evaluation": {
    },
  • "project": "bj",
  • "updated": 1363887380336723500,
  • "value": "Ut voluptatem voluptas ea adipisci.",
  • "value_type": "secret",
  • "workspace": "Odio nihil nisi ipsam est iusto voluptatum."
}

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

Project is the project identifier.

Example: mcs
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Non consequuntur voluptatem facere aspernatur.
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: 1j
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

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

Project is the project identifier.

Example: t6
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Cum quisquam praesentium eveniet explicabo eos laudantium.
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: evb
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: xar
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": "f1",
  • "created": 7306330495179697000,
  • "key": "72",
  • "kind": "env",
  • "org": "x",
  • "project": "5",
  • "updated": 7067840584865146000,
  • "value": "Molestias est non est sit quas.",
  • "value_type": "secret",
  • "workspace": "Ea itaque aut aut aut."
}

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

Project is the project identifier.

Example: uh
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Non molestias impedit in.
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: nk
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: tnu
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": "Exercitationem ut nulla recusandae consequuntur.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}