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

Project is the project identifier.

Example: f5
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Et est enim et quos numquam qui.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: s
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: wo
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: Magni amet fugiat sit quidem.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: znw
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": "rxu",
  • "kind": "env",
  • "value": "Voluptatibus ducimus delectus sit et iusto.",
  • "value_type": "string"
}
Response samples
application/json
{
  • "account": "5x",
  • "created": 3885163018946396000,
  • "key": "yuc",
  • "kind": "tf",
  • "org": "w4",
  • "policy_evaluation": {
    },
  • "project": "6sr",
  • "updated": 6113935955089854000,
  • "value": "Maxime ex quam est.",
  • "value_type": "secret",
  • "workspace": "Temporibus illum aut ipsa laboriosam impedit eum."
}

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

Project is the project identifier.

Example: z
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Quae qui eligendi.
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: xej
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

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

Project is the project identifier.

Example: d
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Perspiciatis quos.
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: n
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: x
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": "5",
  • "created": 4954813006922963000,
  • "key": "q6h",
  • "kind": "tf",
  • "org": "yfh",
  • "project": "ck",
  • "updated": 3210772562505968000,
  • "value": "Qui rerum itaque molestiae.",
  • "value_type": "secret",
  • "workspace": "Sint est perferendis velit dolores et laboriosam."
}

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

Project is the project identifier.

Example: iss
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Veniam quae a vero ut.
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: t
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: c
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": "Enim quibusdam soluta minus aut.",
  • "value_type": "string"
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}