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

Project is the project identifier.

Example: p
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Omnis ab dolore ut numquam.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 0hz
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: o2
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: wg
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Nostrum rerum mollitia non eum.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 4l4
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": "f",
  • "kind": "env",
  • "value": "Minima laboriosam aperiam optio quia.",
  • "value_type": "string"
}
Response samples
application/json
{
  • "account": "4t6",
  • "created": 27964620516703140,
  • "key": "m",
  • "kind": "env",
  • "org": "hq",
  • "policy_evaluation": {
    },
  • "project": "1h",
  • "updated": 4571342399890101000,
  • "value": "Sint consequuntur necessitatibus quia assumenda.",
  • "value_type": "secret",
  • "workspace": "Incidunt et asperiores sint reprehenderit."
}

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

Project is the project identifier.

Example: rgv
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Natus ipsa rem.
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: m
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

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

Project is the project identifier.

Example: j
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Qui aut at iste numquam tempore repellat.
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: 1
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: p
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": "w8",
  • "created": 2956900173847807500,
  • "key": "zw",
  • "kind": "env",
  • "org": "979",
  • "project": "872",
  • "updated": 4169076552075429000,
  • "value": "Et accusantium voluptas beatae similique expedita dignissimos.",
  • "value_type": "string",
  • "workspace": "Eos nihil."
}

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

Project is the project identifier.

Example: s
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Aperiam ratione adipisci qui facilis dolorum.
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: uxn
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 22o
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": "Autem quia vel.",
  • "value_type": "secret"
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}