workspaces

Workspaces Service handles the API for managing workspaces and triggering workflows against them.

list-workspaces workspaces

List all workspaces.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 1w
query Parameters
limit
integer <int64> [ 1 .. 1000 ]
Default: 30

Limit is the number of records to return for a page.

Example: limit=30
page
integer <int64> >= 1
Default: 1

Page is the page number to return relative to the page 'limit'.

Example: page=1
searchTerm
string
Default: ""

Filter results by partial name match

Example: searchTerm=mysta
sort
string
Default: "name,ASC"

Sort order for results

Enum: "name,ASC" "name,DESC" "updated,ASC" "updated,DESC"
Example: sort=updated,ASC
status
Array of strings

Status of the execution

Example: status=Doloremque architecto quis alias sunt dolores tempore.&status=Non ut nisi eius.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: py3
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
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

create-workspace workspaces

Create a new workspace.

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

Org is the organisation identifier.

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

Project is the project identifier.

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

Account is the internal customer account ID.

Example: nn0
Request Body schema: application/json
required
budget
number <float>

define the budget for a specific workspace

cost_breakdown_json
string

cost_breakdown_json is the identifier to the breakdown cost file from the current execution that was applied successfully

cost_diff_json
string

cost_diff_json is the identifier to the diff cost file between the previous and current successful executions

cost_estimation_enabled
boolean
Default: false

define if cost estimation operations will be performed in this workspace

description
string

Description provides long-form text about the resource.

required
object

list of environment variables configured on the workspace.

identifier
required
string [ 1 .. 128 ] characters

Workspace identifier.

name
required
string [ 1 .. 128 ] characters

Name is the human readable name for the resource.

provider_connector
required
string

Provider Connector is the reference to the connector for the infrastructure provider.

provisioner
required
string

Provisioner defines the provisioning tool to use.

Enum: "terraform" "opentofu"
provisioner_version
string
Default: "latest"

Provisioner Version defines the tool version to use.

repository
string

Repository is the name of the repository to use.

repository_branch
string

Repository Branch in which the code should be accessed.

repository_commit
string

Repository Commit/Tag in which the code should be accessed.

repository_connector
string

Repository Connector is the reference to the connector to use for this code.

repository_path
string
Default: ""

Repository Path is the path in which the infra code resides.

repository_sha
string

Repository SHA in which the code should be accessed.

terraform_plan_json
string

terraform_plan_json is the identifier to the current state file onl in JSON format.

terraform_state
string

terraform_state is the identifier to the plan file used to create the latest state.

terraform_state_json
string

terraform_state_json is the identifier to the plan file used to create the latest state only in JSON format.

Array of objects (WorkspaceTerraformVariableFiles)

define an array of terraform variables files that belong to a different repository

required
object

list of terraform variables configured on the workspace.

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
Request samples
application/json
{
  • "budget": 0.9096575,
  • "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_estimation_enabled": true,
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "identifier": "22s",
  • "name": "resource name",
  • "provider_connector": "Qui qui qui et et qui qui.",
  • "provisioner": "opentofu",
  • "provisioner_version": "Ipsa sint corporis soluta minima.",
  • "repository": "Ad non.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Quia error aut rerum qui fuga consequatur.",
  • "repository_path": "",
  • "repository_sha": "abc10ed",
  • "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  • "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  • "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "terraform_variable_files": [
    ],
  • "terraform_variables": {
    }
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}

destroy-workspace workspaces

Deletes the given workspace.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: p
identifier
required
string [ 1 .. 128 ] characters

Identifier is the project identifier.

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

Account is the internal customer account ID.

Example: yq
Responses
204

No Content 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/{identifier}
Request samples

show-workspace workspaces

Show an individual workspace.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 7o
identifier
required
string [ 1 .. 128 ] characters

Identifier is the project identifier.

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

Account is the internal customer account ID.

Example: ld7
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/{identifier}
Request samples
Response samples
application/json
{
  • "account": "1",
  • "backend_locked": true,
  • "budget": 0.6278591,
  • "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_estimation_enabled": true,
  • "created": 3624000376410043000,
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "identifier": "jbg",
  • "name": "resource name",
  • "org": "6",
  • "project": "3a",
  • "provider_connector": "Odio aut.",
  • "provisioner": "terraform",
  • "provisioner_data": "Sapiente minus unde architecto et qui.",
  • "provisioner_version": "Explicabo ea et maxime nihil ipsa.",
  • "repository": "Et quam magnam quod cupiditate.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Quo sint quisquam.",
  • "repository_path": "",
  • "repository_sha": "abc10ed",
  • "status": "unknown",
  • "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  • "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  • "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "terraform_variable_files": [
    ],
  • "terraform_variables": {
    },
  • "updated": 6193533642257402000
}

update-workspace workspaces

Updates the given workspace with new info.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: i
identifier
required
string [ 1 .. 128 ] characters

Workspace identifier.

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

Account is the internal customer account ID.

Example: 6
Request Body schema: application/json
required
budget
number <float>

define the budget for a specific workspace

cost_estimation_enabled
boolean
Default: false

define if cost estimation operations will be performed in this workspace

description
string

Description provides long-form text about the resource.

required
object

list of environment variables configured on the workspace.

name
required
string [ 1 .. 128 ] characters

Name is the human readable name for the resource.

provider_connector
required
string

Provider Connector is the reference to the connector for the infrastructure provider.

provisioner
required
string

Provisioner defines the provisioning tool to use.

Enum: "terraform" "opentofu"
provisioner_version
string
Default: "latest"

Provisioner Version defines the tool version to use.

repository
string

Repository is the name of the repository to use.

repository_branch
string

Repository Branch in which the code should be accessed.

repository_commit
string

Repository Commit/Tag in which the code should be accessed.

repository_connector
string

Repository Connector is the reference to the connector to use for this code.

repository_path
string
Default: ""

Repository Path is the path in which the infra code resides.

repository_sha
string

Repository SHA in which the code should be accessed.

Array of objects (WorkspaceTerraformVariableFiles)

define an array of terraform variables files that belong to a different repository

required
object

list of terraform variables configured on the workspace.

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/{identifier}
Request samples
application/json
{
  • "budget": 0.66242224,
  • "cost_estimation_enabled": true,
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "name": "resource name",
  • "provider_connector": "Praesentium consequatur esse tenetur dolore et earum.",
  • "provisioner": "opentofu",
  • "provisioner_version": "Voluptas omnis praesentium atque.",
  • "repository": "Accusamus sint optio dignissimos illo laborum eum.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Nostrum aut voluptas suscipit esse.",
  • "repository_path": "",
  • "repository_sha": "abc10ed",
  • "terraform_variable_files": [
    ],
  • "terraform_variables": {
    }
}
Response samples
application/json
{
  • "policy_evaluation": {
    }
}

force-unlock-workspace workspaces

Force unlock a workspace.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

Example: du9
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/{identifier}/actions/force-unlock
Request samples

list-resources workspaces

List resources associated with this workspace.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 8s
identifier
required
string [ 1 .. 128 ] characters

Identifier is the project identifier.

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

Account is the internal customer account ID.

Example: wm
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/{identifier}/resources
Request samples
Response samples
application/json
{
  • "outputs": [
    ],
  • "resources": [
    ]
}

list-data workspaces

List all stored data for a workspace.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: yf
workspace
required
string

Workspace identifier

Example: Fugit consequatur numquam perspiciatis earum iure dolorem.
query Parameters
pipeline_execution_id
string

Filter by pipeline execution ID

Example: pipeline_execution_id=Et deserunt a.
pipelin