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

Project is the project identifier.

Example: o6m
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=Voluptate est officia.&status=Ratione qui ut adipisci deleniti dolorum similique.&status=Hic repellat facere.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 2gg
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: 74
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

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

Account is the internal customer account ID.

Example: nw0
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

object

List of default pipelines associated with this workspace and any per-workspace overrrides.

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.12234099,
  • "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_estimation_enabled": true,
  • "default_pipelines": {
    },
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "identifier": "3",
  • "name": "resource name",
  • "provider_connector": "Neque ullam laborum dicta in.",
  • "provisioner": "terraform",
  • "provisioner_version": "Dolores ut voluptatum autem eligendi assumenda doloribus.",
  • "repository": "Nihil libero nemo similique pariatur ea.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Praesentium et quasi voluptas voluptatem iste.",
  • "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: vr8
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

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

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

Example: 0
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": "usr",
  • "backend_locked": false,
  • "budget": 0.59996074,
  • "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_estimation_enabled": true,
  • "created": 2541057058745774600,
  • "default_pipelines": {
    },
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "identifier": "k",
  • "name": "resource name",
  • "org": "m",
  • "project": "sl8",
  • "provider_connector": "Et nesciunt veritatis ipsa non voluptas saepe.",
  • "provisioner": "opentofu",
  • "provisioner_data": "Reprehenderit distinctio deleniti exercitationem reiciendis.",
  • "provisioner_version": "Animi quae unde.",
  • "repository": "Dolores voluptatem.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Dolor nobis corporis sit qui.",
  • "repository_path": "",
  • "repository_sha": "abc10ed",
  • "status": "failed",
  • "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  • "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  • "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "terraform_variable_files": [
    ],
  • "terraform_variables": {
    },
  • "updated": 2021486826809921300
}

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

Project is the project identifier.

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

Workspace identifier.

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

Account is the internal customer account ID.

Example: fi
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

object

List of default pipelines associated with this workspace and any per-workspace overrrides.

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.20790882,
  • "cost_estimation_enabled": true,
  • "default_pipelines": {
    },
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "name": "resource name",
  • "provider_connector": "Quia voluptatem rerum aut odit et.",
  • "provisioner": "opentofu",
  • "provisioner_version": "Itaque nam ratione laudantium non sit.",
  • "repository": "Sequi nam.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Voluptatem aut deserunt qui.",
  • "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: 3
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

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

Project is the project identifier.

Example: 71c
identifier
required
string [ 1 .. 128 ] characters

Identifier is the project identifier.

Example: q
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/{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: oa
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: sed
workspace
required
string

Workspace identifier

Example: Suscipit quos minus velit velit ut.
query Parameters
pipeline_execution_id
string

Filter by pipeline execution ID

Example: pipeline_execution_id=Aliquid et quae in voluptatem ut.
pipeline_stage_id
string

Filter by pipeline execution stage ID

Example: pipeline_stage_id=Totam voluptatem voluptatem quibusdam.
provisioner_type
string

Filter by provisioner type

Example: provisioner_type=Qui maiores ea sed qui.
data_type
string

Filter by data type

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

Account is the internal customer account ID.

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

create-data workspaces

Store binary data generated by the provisioner, such as plans and state files.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 6r
workspace
required
string

Workspace identifier

Example: workspace123
query Parameters
pipeline_id
required
string

The unique identifier for the associated pipeline

Example: pipeline_id=Id minima voluptas tenetur rerum velit.
stage_id
required
string

The unique identifier for a stage

Example: stage_id=Voluptatem beatae dolores corporis.
pipeline_execution_id
required
string

The unique identifier for the associated pipeline execution

Example: pipeline_execution_id=Facilis vel illo sit aut ad est.
pipeline_stage_id
required
string

The unique identifier for the associated pipeline execution stage

Example: pipeline_stage_id=Dolore corporis.
provisioner_type
required
string

Type of provisioner that created the data

Value: "tf"
Example: provisioner_type=tf
data_type
required
string

Type of data stored

Enum: "plan_human" "state_raw" "state_human" "cost_breakdown" "cost_diff"
Example: data_type=plan_human
policy_action
string

Policy action used during OPA evaluation

Example: policy_action=afterTerraformApply
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 653
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}/data
Request samples
Response samples
application/json
{
  • "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  • "policy_evaluation": [
    ],
  • "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  • "policy_evaluation_status": "error"
}

show-data workspaces

Get binary data generated by the provisioner, such as plans and state files.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 8jl
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Labore et cupiditate labore atque necessitatibus.
id
required
string

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: jf
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}/data/{id}
Request samples
Response samples
application/json
"string"

evaluate-data workspaces

Evaluate policy against previously stored data, such as plans and state files.

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: h
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Neque voluptas tempore.
id
required
string

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
query Parameters
pipeline_execution_id
string

Pipeline execution associated with this evaluation

Example: pipeline_execution_id=Dolor sint.
policy_action
required
string

Policy action used during OPA evaluation

Example: policy_action=afterTerraformApply
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: jxk
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}/data/{id}/evaluate-policy
Request samples
Response samples
application/json
{
  • "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  • "policy_evaluation": [
    ],
  • "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  • "policy_evaluation_status": "error"
}

send-event workspaces

Store binary data generated by the provisioner, such as plans and state files.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: e
workspace
required
string

ID of uploaded data

Example: Sunt ut deleniti sit et aut.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: coh
Request Body schema: application/json
required
object
event_type
required
string

The type of event that occurred

Enum: "plan" "drifted" "provisioning" "destroying" "active" "inactive" "failed"
object
pipeline_execution_id
required
string

Associated pipeline execution ID

pipeline_stage_id
required
string

Associated pipeline execution stage ID

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}/events
Request samples
application/json
{
  • "data": {
    },
  • "event_type": "failed",
  • "metadata": {
    },
  • "pipeline_execution_id": "Asperiores rem aspernatur.",
  • "pipeline_stage_id": "Numquam a."
}

list-pipelines workspaces

List the pipelines where the workspace is been used

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 45
workspace
required
string

Workspace identifier

Example: Ipsam harum consequuntur voluptatibus ut qui labore.
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
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: vu
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}/pipelines
Request samples
Response samples
application/json
{
  • "account": "ubh",
  • "org": "br",
  • "pipelines": [
    ],
  • "project": "jex"
}