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

Project is the project identifier.

Example: e
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=name,ASC
status
Array of strings

Status of the execution

Example: status=Aut quia architecto et nisi.&status=Officiis velit sunt beatae incidunt quod tempore.&status=Omnis ut quae cum occaecati.&status=Illum sit.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

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

Project is the project identifier.

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

Account is the internal customer account ID.

Example: 68
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.5150909,
  • "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": "z",
  • "name": "resource name",
  • "provider_connector": "Dolores autem pariatur incidunt velit sed.",
  • "provisioner": "opentofu",
  • "provisioner_version": "Minima sint.",
  • "repository": "Id doloremque.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Illo deserunt ab.",
  • "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: crc
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

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

Project is the project identifier.

Example: 437
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: 6o
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": "y5",
  • "backend_locked": true,
  • "budget": 0.22656307,
  • "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "cost_estimation_enabled": true,
  • "created": 7792390205660702000,
  • "default_pipelines": {
    },
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "identifier": "qp",
  • "name": "resource name",
  • "org": "3w1",
  • "project": "di",
  • "provider_connector": "Id voluptatum necessitatibus est impedit occaecati incidunt.",
  • "provisioner": "opentofu",
  • "provisioner_data": "Aut enim similique quo id ab.",
  • "provisioner_version": "Fugit et ullam est possimus.",
  • "repository": "Et praesentium aut omnis enim quas quas.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Dolores earum animi aliquid ea nihil alias.",
  • "repository_path": "",
  • "repository_sha": "abc10ed",
  • "status": "active",
  • "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  • "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  • "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  • "terraform_variable_files": [
    ],
  • "terraform_variables": {
    },
  • "updated": 4637921357432606000
}

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

Project is the project identifier.

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

Workspace identifier.

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

Account is the internal customer account ID.

Example: ix0
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.5587374,
  • "cost_estimation_enabled": true,
  • "default_pipelines": {
    },
  • "description": "this is a more detailed explanation of the resource.",
  • "environment_variables": {
    },
  • "name": "resource name",
  • "provider_connector": "Saepe quo accusamus.",
  • "provisioner": "opentofu",
  • "provisioner_version": "Ipsa et nam libero earum eum.",
  • "repository": "Consequatur quasi rerum dolorem asperiores.",
  • "repository_branch": "main",
  • "repository_commit": "abc10ed",
  • "repository_connector": "Cumque non ducimus.",
  • "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: 24
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

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

Project is the project identifier.

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

Identifier is the project identifier.

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

Account is the internal customer account ID.

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

Project is the project identifier.

Example: tw
workspace
required
string

Workspace identifier

Example: Nisi quasi velit soluta neque qui.
query Parameters
pipeline_execution_id
string

Filter by pipeline execution ID

Example: pipeline_execution_id=Nesciunt consequatur dolorum et odio ut accusamus.
pipeline_stage_id
string

Filter by pipeline execution stage ID

Example: pipeline_stage_id=Voluptatum minima qui.
provisioner_type
string

Filter by provisioner type

Example: provisioner_type=Assumenda non voluptas vel vitae aliquam.
data_type
string

Filter by data type

Example: data_type=Molestiae voluptas sit quod odio porro rerum.
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: m
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: 21
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: lto
workspace
required
string

Workspace identifier

Example: workspace123
query Parameters
pipeline_id
required
string

The unique identifier for the associated pipeline

Example: pipeline_id=Reprehenderit quas commodi odio possimus iusto est.
stage_id
required
string

The unique identifier for a stage

Example: stage_id=Explicabo in est distinctio quis dignissimos.
pipeline_execution_id
required
string

The unique identifier for the associated pipeline execution

Example: pipeline_execution_id=Quas optio.
pipeline_stage_id
required
string

The unique identifier for the associated pipeline execution stage

Example: pipeline_stage_id=Aliquam exercitationem soluta deleniti asperiores.
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=cost_breakdown
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: y
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: 1
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: i
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Non quidem in itaque.
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: n
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: 1
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: s80
workspace
required
string

Workspace is the resource workspace this variable is associated with.

Example: Et est vel voluptates qui sed.
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=Accusantium dolor ut.
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: v
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: b
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: xq9
workspace
required
string

ID of uploaded data

Example: Quos aut est non et et.
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: s
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": "inactive",
  • "metadata": {
    },
  • "pipeline_execution_id": "Sapiente eos suscipit aut corporis consectetur consequatur.",
  • "pipeline_stage_id": "Eaque sint sit."
}

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

Project is the project identifier.

Example: m
workspace
required
string

Workspace identifier

Example: Corporis eveniet ullam sed.
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: ho
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": "z",
  • "org": "rm",
  • "pipelines": [
    ],
  • "project": "k"
}