Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Workspaces

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

List all workspace tags

get

List all tags

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: d
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 0
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: mb
Responses
200

OK response.

application/json
string[]OptionalExample: ["Totam quam illo voluptatibus exercitationem ut.","Minima quam id ut non tempora qui.","Doloremque earum et est voluptates officia ipsam."]
get/api/orgs/{org}/projects/{project}/tags
GET /api/orgs/{org}/projects/{project}/tags HTTP/1.1
Host: localhost:80
Harness-Account: mb
Accept: */*
[
  "Error ad quod magnam ipsum laudantium vitae.",
  "Esse itaque unde.",
  "Itaque est earum laudantium velit asperiores et."
]

Show workspace metrics

get

Show metrics for workspaces

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: yqz
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: st
Query parameters
start_timeinteger · int64Optional

Start time filter (Unix timestamp)

Example: 7488794139730840000
end_timeinteger · int64Optional

End time filter (Unix timestamp)

Example: 5584043480870504000
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0j
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspace-metrics
GET /api/orgs/{org}/projects/{project}/workspace-metrics HTTP/1.1
Host: localhost:80
Harness-Account: 0j
Accept: */*
{
  "status_counts": {
    "Minus quaerat atque.": 3206029449139134500
  }
}

List workspaces

get

List all workspaces.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 7o
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: jtn
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

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

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

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

Default: 1Example: 1
searchTermstringOptional

Filter results by partial name match

Default: ""Example: mysta
sortstring · enumOptional

Sort order for results

Default: name,ASCExample: name,ASCPossible values:
statusstring[]Optional

Status of the execution

Example: ["Vitae voluptatem.","Fugit placeat suscipit aut.","Voluptas labore labore molestiae est at enim."]
tagsstring[]Optional

Comma separated list of tags to filter by

Example: ["Et maiores tenetur.","Nostrum cumque rerum est adipisci modi debitis.","Et voluptatem laudantium id blanditiis.","Alias a necessitatibus quisquam."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspaces
GET /api/orgs/{org}/projects/{project}/workspaces HTTP/1.1
Host: localhost:80
Harness-Account: 5
Accept: */*
[
  {
    "account": "e1",
    "created": 2335482780094034400,
    "description": "this is a more detailed explanation of the resource.",
    "identifier": "4",
    "name": "resource name",
    "org": "t",
    "project": "6",
    "status": "active",
    "updated": 6157082135055780000
  },
  {
    "account": "e1",
    "created": 2335482780094034400,
    "description": "this is a more detailed explanation of the resource.",
    "identifier": "4",
    "name": "resource name",
    "org": "t",
    "project": "6",
    "status": "active",
    "updated": 6157082135055780000
  },
  {
    "account": "e1",
    "created": 2335482780094034400,
    "description": "this is a more detailed explanation of the resource.",
    "identifier": "4",
    "name": "resource name",
    "org": "t",
    "project": "6",
    "status": "active",
    "updated": 6157082135055780000
  },
  {
    "account": "e1",
    "created": 2335482780094034400,
    "description": "this is a more detailed explanation of the resource.",
    "identifier": "4",
    "name": "resource name",
    "org": "t",
    "project": "6",
    "status": "active",
    "updated": 6157082135055780000
  }
]

Create workspace

post

Create a new workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 5
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: inr
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: t
Body
budgetnumber · floatOptional

define the budget for a specific workspace

Example: 0.5693851
ccm_cost_enabledbooleanOptional

define if CCM cost integration is enabled for this workspace

Default: falseExample: true
cost_breakdown_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
cost_diff_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
cost_estimation_enabledbooleanOptional

define if cost estimation operations will be performed in this workspace

Default: falseExample: true
create_default_pipelinesbooleanOptional

if true, auto-generate default pipelines for the workspace provisioner at creation time

Default: falseExample: false
descriptionstringOptional

Description provides long-form text about the resource.

Example: this is a more detailed explanation of the resource.
git_fetch_typestringOptional

Git fetch type (branch/commitId/sha) - can contain JEXL expressions.

Example: branch
idinteger · int64Optional

ID PK for internal uses

Example: 5620433849146420000
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: ch0
modules_jsonstringOptional

modules_json is the identifier of any modules metadata associated with this workspace

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
namestring · min: 1 · max: 128Required

Name is the human readable name for the resource.

Example: resource name
provider_connectorstringRequired

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

Example: Eum ipsa voluptatibus earum porro.
providers_jsonstringOptional

providers_json is the identifier of any modules metadata associated with this workspace

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
provisionerstringRequired

Provisioner defines the provisioning tool to use.

Example: Occaecati sed animi.
provisioner_configurationstringOptional

Provisioner configuration metadata (key value pair provisioner specific configuration).

Example: Adipisci sunt et odit eos minus dolores.
provisioner_versionstringOptional

Provisioner Version defines the tool version to use.

Default: latestExample: Dicta dolores.
prune_sensitive_databooleanOptional

prune_sensitive_data is a flag to enable or disable pruning of sensitive data

Default: falseExample: true
repositorystringOptional

Repository is the name of the repository to use.

Example: Cupiditate et.
repository_branchstringOptional

Repository Branch in which the code should be accessed.

Example: main
repository_commitstringOptional

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

Example: abc10ed
repository_connectorstringOptional

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

Example: Libero accusantium esse et ratione labore atque.
repository_pathstringOptional

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

Default: ""
repository_refstringOptional

Generic repository reference (branch/commit/sha) used with JEXL expressions.

Example: <+stage.variables.REF>
repository_shastringOptional

Repository SHA in which the code should be accessed.

Example: abc10ed
repository_submodulesstring · enumOptional

repository_submodules is the instruction about whether to clone submodules in the pipeline step

Default: falseExample: recursivePossible values:
run_allbooleanOptional

Run-All terragrunt modules.

Example: true
sparse_checkoutstringOptional

List of patterens that will be used for sparse checkout option of git clone

Example: Eos debitis aliquam nostrum perspiciatis ipsum dolor.
state_checksumstringOptional

state_checksum is the sha-256 checksum of terraform state file

Example: d21c1662d8ce2c74f24efdc8db93eb34473b86810aeccca4b1518f70b0ccde8f
terraform_plan_jsonstringOptional

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

Example: f9e21473daaa2674d862b67a1339f4570e86de17
terraform_statestringOptional

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

Example: fc1200c7a7aa52109d762a9f005b149abef01479
terraform_state_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
terragrunt_providerbooleanOptional

Whether this workspace uses terragrunt to provision infrastructure

Default: falseExample: true
terragrunt_versionstringOptional

Terragrunt Version to use when provisioner is terragrunt.

Example: Rem voluptas totam.
variable_setsstring[]Optional

Attached Variable Sets references

Example: ["Cumque voluptate perspiciatis quidem exercitationem.","Consectetur facilis minima voluptatem illo ut maiores."]
Responses
200

OK response.

application/json

Create-WorkspaceResponseBody result type (default view)

post/api/orgs/{org}/projects/{project}/workspaces
POST /api/orgs/{org}/projects/{project}/workspaces HTTP/1.1
Host: localhost:80
Harness-Account: t
Content-Type: application/json
Accept: */*
Content-Length: 4921

{
  "associated_template": {
    "template_id": "urr",
    "version": "nwg"
  },
  "budget": 0.2619898,
  "ccm_cost_enabled": false,
  "cdk_context_files": [
    {
      "repository": "cdk-context",
      "repository_branch": "main",
      "repository_connector": "account.github_connector",
      "repository_path": "context/"
    }
  ],
  "cdk_variables": {
    "Enim quae aut velit officiis.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    },
    "Id laboriosam enim inventore corporis excepturi.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "cost_estimation_enabled": true,
  "create_default_pipelines": false,
  "default_pipelines": {
    "Error rerum omnis vero.": {
      "project_pipeline": "Rerum deleniti amet quia consectetur.",
      "workspace_pipeline": "Architecto et."
    },
    "Eum et et voluptates facere tenetur.": {
      "project_pipeline": "Rerum deleniti amet quia consectetur.",
      "workspace_pipeline": "Architecto et."
    }
  },
  "description": "this is a more detailed explanation of the resource.",
  "environment_variables": {
    "Saepe quam eos deserunt a.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "git_fetch_type": "branch",
  "id": 7886113068543970000,
  "identifier": "pe",
  "modules_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "name": "resource name",
  "provider_connector": "Dicta voluptates sed ipsa itaque.",
  "provider_connectors": [
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    },
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    },
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    },
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    }
  ],
  "providers_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "provisioner": "Numquam eum rem id nostrum rerum tenetur.",
  "provisioner_configuration": "Vel consequatur harum aut.",
  "provisioner_version": "Sunt et minus voluptas recusandae sed qui.",
  "prune_sensitive_data": true,
  "repository": "Placeat consequuntur iusto exercitationem itaque repellendus vel.",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "Et ut.",
  "repository_path": "",
  "repository_ref": "<+stage.variables.REF>",
  "repository_sha": "abc10ed",
  "repository_submodules": "recursive",
  "run_all": false,
  "sparse_checkout": "Aliquam pariatur nihil.",
  "state_checksum": "d21c1662d8ce2c74f24efdc8db93eb34473b86810aeccca4b1518f70b0ccde8f",
  "tags": {
    "cost-center": "engineering",
    "environment": "production",
    "team": "platform"
  },
  "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "terraform_variable_files": [
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    }
  ],
  "terraform_variables": {
    "Hic quia harum aut commodi.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    },
    "Voluptatem aut veniam.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "terragrunt_provider": true,
  "terragrunt_version": "Atque debitis odit.",
  "variable_sets": [
    "Est repellat blanditiis enim eos nam.",
    "Voluptatem et asperiores.",
    "Consectetur similique ipsa ut corporis earum."
  ]
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      }
    ],
    "entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "id": 123,
    "input": "",
    "org_id": "test-org",
    "project_id": "test-project",
    "status": "error",
    "type": "pipeline,service"
  }
}

Show workspace

get

Show an individual workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 6l
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 8
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: 490
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: j
Responses
200

OK response.

application/json

Show-WorkspaceResponseBody result type (default view)

accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: faw
backend_lockedbooleanOptional

Defines if the remote backend is locked or not

Default: falseExample: false
budgetnumber · floatOptional

define the budget for a specific workspace

Example: 0.77379626
ccm_cost_enabledbooleanOptional

define if CCM cost integration is enabled for this workspace

Default: falseExample: false
cost_breakdown_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
cost_diff_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
cost_estimation_enabledbooleanOptional

define if cost estimation operations will be performed in this workspace

Default: falseExample: true
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 245789994206227550
descriptionstringOptional

Description provides long-form text about the resource.

Example: this is a more detailed explanation of the resource.
git_fetch_typestringOptional

Git fetch type (branch/commitId/sha) - can contain JEXL expressions.

Example: branch
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: v
modules_jsonstringOptional

modules_json is the identifier of any modules metadata associated with this workspace

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
namestring · min: 1 · max: 128Required

Name is the human readable name for the resource.

Example: resource name
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: m
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: zxa
provider_connectorstringRequired

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

Example: Dolorem magni nemo non incidunt.
providers_jsonstringOptional

providers_json is the identifier of any modules metadata associated with this workspace

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
provisionerstringRequired

Provisioner defines the provisioning tool to use.

Example: Suscipit consequatur dolores modi.
provisioner_configurationstringOptional

Provisioner configuration metadata (key value pair provisioner specific configuration).

Example: Doloremque vel quibusdam consequatur id sit.
provisioner_datastringRequiredExample: Similique maxime sed modi et.
provisioner_versionstringOptional

Provisioner Version defines the tool version to use.

Default: latestExample: Eos aut.
prune_sensitive_databooleanOptional

prune_sensitive_data is a flag to enable or disable pruning of sensitive data

Default: falseExample: true
repositorystringOptional

Repository is the name of the repository to use.

Example: Omnis vitae.
repository_branchstringOptional

Repository Branch in which the code should be accessed.

Example: main
repository_commitstringOptional

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

Example: abc10ed
repository_connectorstringRequired

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

Example: Doloremque nostrum dolorum est ut in.
repository_pathstringOptional

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

Default: ""
repository_refstringOptional

Generic repository reference (branch/commit/sha) used with JEXL expressions.

Example: <+stage.variables.REF>
repository_shastringOptional

Repository SHA in which the code should be accessed.

Example: abc10ed
repository_submodulesstring · enumOptional

repository_submodules is the instruction about whether to clone submodules in the pipeline step

Default: falseExample: recursivePossible values:
run_allbooleanOptional

Run-All terragrunt modules.

Example: false
sparse_checkoutstringOptional

List of patterens that will be used for sparse checkout option of git clone

Example: Assumenda necessitatibus fugiat porro.
state_checksumstringOptional

state_checksum is the sha-256 checksum of terraform state file

Example: d21c1662d8ce2c74f24efdc8db93eb34473b86810aeccca4b1518f70b0ccde8f
statusstring · enumRequired

The status of the workspace

Example: unknownPossible values:
terraform_plan_jsonstringOptional

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

Example: f9e21473daaa2674d862b67a1339f4570e86de17
terraform_statestringOptional

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

Example: fc1200c7a7aa52109d762a9f005b149abef01479
terraform_state_jsonstringOptional

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

Example: c4a2d99bc28d236098a095277b7eb0718d6be068
terragrunt_providerbooleanOptional

Whether this workspace uses terragrunt to provision infrastructure

Default: falseExample: false
terragrunt_versionstringOptional

Terragrunt Version to use when provisioner is terragrunt.

Example: Velit ipsa autem reprehenderit dolores.
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 7063517725192963000
variable_setsstring[]Optional

Attached Variable Sets references

Example: ["Porro officia quia doloribus est.","Veritatis dolorem enim architecto iusto.","Voluptatem quis molestiae voluptates rerum.","Itaque atque ipsum."]
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: j
Accept: */*
{
  "account": "2ve",
  "associated_template": {
    "template_id": "eea",
    "version": "7d"
  },
  "backend_locked": true,
  "budget": 0.58620745,
  "ccm_cost_enabled": false,
  "cdk_context_files": [
    {
      "repository": "cdk-context",
      "repository_branch": "main",
      "repository_connector": "account.github_connector",
      "repository_path": "context/"
    }
  ],
  "cdk_variables": {
    "Alias omnis sit.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    },
    "Praesentium inventore blanditiis vitae.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    }
  },
  "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "cost_estimation_enabled": true,
  "created": 9112843322050322000,
  "default_pipelines": {
    "Numquam itaque.": {
      "project_pipeline": "Earum nam dicta.",
      "workspace_pipeline": "Natus maxime adipisci consequatur aliquid sequi."
    }
  },
  "description": "this is a more detailed explanation of the resource.",
  "environment_variables": {
    "Et voluptas quia animi corporis.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    },
    "Fugiat culpa magni et a.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    },
    "Nostrum aut modi est qui.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    }
  },
  "git_fetch_type": "branch",
  "identifier": "tyf",
  "lock": {
    "created_at": 4451099852111615500,
    "id": "Perferendis sint aut.",
    "locked_by_display_name": "Quia harum exercitationem non vel amet id.",
    "locked_by_principal_id": "Facere et dignissimos dolorum velit et porro.",
    "locked_by_principal_type": "Sapiente laboriosam iure excepturi quam cumque.",
    "manual": true,
    "reason": "Distinctio necessitatibus voluptatem deserunt ut veniam."
  },
  "modules_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "name": "resource name",
  "org": "7bb",
  "project": "d",
  "provider_connector": "Atque perferendis incidunt ea.",
  "provider_connectors": [
    {
      "connector_ref": "zb",
      "created": 1627590400,
      "id": 7114607990558172000,
      "terragrunt_provider": true,
      "type": "azure",
      "updated": 1627686800,
      "workspace_id": 9090452521337308000
    },
    {
      "connector_ref": "zb",
      "created": 1627590400,
      "id": 7114607990558172000,
      "terragrunt_provider": true,
      "type": "azure",
      "updated": 1627686800,
      "workspace_id": 9090452521337308000
    },
    {
      "connector_ref": "zb",
      "created": 1627590400,
      "id": 7114607990558172000,
      "terragrunt_provider": true,
      "type": "azure",
      "updated": 1627686800,
      "workspace_id": 9090452521337308000
    },
    {
      "connector_ref": "zb",
      "created": 1627590400,
      "id": 7114607990558172000,
      "terragrunt_provider": true,
      "type": "azure",
      "updated": 1627686800,
      "workspace_id": 9090452521337308000
    }
  ],
  "providers_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "provisioner": "Voluptas eos.",
  "provisioner_configuration": "Facilis exercitationem libero nihil.",
  "provisioner_data": "Reprehenderit quo.",
  "provisioner_version": "Fuga atque et error voluptatem.",
  "prune_sensitive_data": true,
  "repository": "Id ad nemo voluptas quam et et.",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "Quaerat non ipsum pariatur nisi eos quae.",
  "repository_path": "",
  "repository_ref": "<+stage.variables.REF>",
  "repository_sha": "abc10ed",
  "repository_submodules": "recursive",
  "run_all": true,
  "sparse_checkout": "Blanditiis pariatur quae nihil quia.",
  "state_checksum": "d21c1662d8ce2c74f24efdc8db93eb34473b86810aeccca4b1518f70b0ccde8f",
  "status": "failed",
  "tags": {
    "cost-center": "engineering",
    "environment": "production",
    "team": "platform"
  },
  "terraform_plan_json": "f9e21473daaa2674d862b67a1339f4570e86de17",
  "terraform_state": "fc1200c7a7aa52109d762a9f005b149abef01479",
  "terraform_state_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
  "terraform_variable_files": [
    {
      "git_fetch_type": "branch",
      "priority": 110954524797471300,
      "repository": "Quibusdam animi.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Eos nulla non.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 110954524797471300,
      "repository": "Quibusdam animi.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Eos nulla non.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 110954524797471300,
      "repository": "Quibusdam animi.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Eos nulla non.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    }
  ],
  "terraform_variables": {
    "Alias architecto nulla reiciendis ea dolor nostrum.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    },
    "Sed sapiente iure alias a voluptates vero.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    },
    "Sequi quis blanditiis.": {
      "created": 1943778209777329700,
      "key": "9uh",
      "updated": 6028789862012497000,
      "value": "Ad dolorem error voluptatem.",
      "value_type": "string"
    }
  },
  "terragrunt_provider": true,
  "terragrunt_version": "Corporis dignissimos dolorum.",
  "updated": 5001398671280299000,
  "variable_sets": [
    "Magni repellat sunt et rerum.",
    "Aut aliquam nobis impedit ut.",
    "Necessitatibus blanditiis beatae.",
    "Consequatur neque repellat quidem quia harum omnis."
  ]
}

Update workspace

put

Updates the given workspace with new info.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: h0
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 6
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: o6r
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: caj
Body
budgetnumber · floatOptional

define the budget for a specific workspace

Example: 0.8796052
ccm_cost_enabledbooleanOptional

define if CCM cost integration is enabled for this workspace

Default: falseExample: false
cost_estimation_enabledbooleanOptional

define if cost estimation operations will be performed in this workspace

Default: falseExample: true
descriptionstringOptional

Description provides long-form text about the resource.

Example: this is a more detailed explanation of the resource.
git_fetch_typestringOptional

Git fetch type (branch/commitId/sha) - can contain JEXL expressions.

Example: branch
namestring · min: 1 · max: 128Required

Name is the human readable name for the resource.

Example: resource name
provider_connectorstringRequired

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

Example: Eum id dicta et.
provisionerstringRequired

Provisioner defines the provisioning tool to use.

Example: Omnis assumenda.
provisioner_configurationstringOptional

Provisioner configuration metadata (key value pair provisioner specific configuration).

Example: Ab cumque quia.
provisioner_versionstringOptional

Provisioner Version defines the tool version to use.

Default: latestExample: Est odio error eos.
prune_sensitive_databooleanOptional

prune_sensitive_data is a flag to enable or disable pruning of sensitive data

Default: falseExample: true
repositorystringOptional

Repository is the name of the repository to use.

Example: Tempora accusamus.
repository_branchstringOptional

Repository Branch in which the code should be accessed.

Example: main
repository_commitstringOptional

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

Example: abc10ed
repository_connectorstringOptional

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

Example: Vitae ea.
repository_pathstringOptional

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

Default: ""
repository_refstringOptional

Generic repository reference (branch/commit/sha) used with JEXL expressions.

Example: <+stage.variables.REF>
repository_shastringOptional

Repository SHA in which the code should be accessed.

Example: abc10ed
repository_submodulesstring · enumOptional

repository_submodules is the instruction about whether to clone submodules in the pipeline step

Default: falseExample: recursivePossible values:
run_allbooleanOptional

Run-All terragrunt modules.

Example: true
sparse_checkoutstringOptional

List of patterens that will be used for sparse checkout option of git clone

Example: Ut quidem.
terragrunt_providerbooleanOptional

Whether this workspace uses terragrunt to provision infrastructure

Default: falseExample: true
terragrunt_versionstringOptional

Terragrunt Version to use when provisioner is terragrunt.

Example: Deleniti assumenda pariatur non voluptatem tempora animi.
updated_atinteger · int64Optional

Optional optimistic-concurrency token. Set this to the "updated" timestamp returned by the last GET/Show of this workspace. If provided and it no longer matches the workspace's current "updated" value, the update is rejected with 409 Conflict and nothing is written. Omit to skip the check (legacy behavior).

Example: 472490218476012500
variable_setsstring[]Optional

Attached Variable Sets references

Example: ["Debitis eius consequatur eligendi.","Quo labore esse deserunt ea eum assumenda."]
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/workspaces/{identifier}
PUT /api/orgs/{org}/projects/{project}/workspaces/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: caj
Content-Type: application/json
Accept: */*
Content-Length: 4164

{
  "budget": 0.12637895,
  "ccm_cost_enabled": false,
  "cdk_context_files": [
    {
      "repository": "cdk-context",
      "repository_branch": "main",
      "repository_connector": "account.github_connector",
      "repository_path": "context/"
    }
  ],
  "cdk_variables": {
    "Fugiat maiores modi soluta.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "cost_estimation_enabled": true,
  "default_pipelines": {
    "Non ratione cupiditate iusto repellendus unde illo.": {
      "project_pipeline": "Rerum deleniti amet quia consectetur.",
      "workspace_pipeline": "Architecto et."
    }
  },
  "description": "this is a more detailed explanation of the resource.",
  "environment_variables": {
    "Animi dolorem adipisci hic dolores magni.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    },
    "Maiores modi est.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    },
    "Voluptas facere excepturi voluptatum aut nulla.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "git_fetch_type": "branch",
  "name": "resource name",
  "provider_connector": "Animi maxime neque sint quo.",
  "provider_connectors": [
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    },
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    },
    {
      "connector_ref": "3x3",
      "created": 1627590400,
      "id": 7418687553247255000,
      "terragrunt_provider": false,
      "type": "vault",
      "updated": 1627686800,
      "workspace_id": 7763510621565255000
    }
  ],
  "provisioner": "Aperiam temporibus ut ipsum necessitatibus iste fugiat.",
  "provisioner_configuration": "Porro blanditiis molestiae quasi.",
  "provisioner_version": "Et aut.",
  "prune_sensitive_data": true,
  "repository": "Illum minima quo voluptatem quo voluptatibus maiores.",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "Quaerat aliquam quo quia.",
  "repository_path": "",
  "repository_ref": "<+stage.variables.REF>",
  "repository_sha": "abc10ed",
  "repository_submodules": "recursive",
  "run_all": false,
  "sparse_checkout": "Et voluptatem aut beatae ullam sit.",
  "tags": {
    "cost-center": "engineering",
    "environment": "production",
    "team": "platform"
  },
  "terraform_variable_files": [
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    },
    {
      "git_fetch_type": "branch",
      "priority": 8019677376764303000,
      "repository": "Omnis deserunt quo.",
      "repository_branch": "main",
      "repository_commit": "abc10ed",
      "repository_connector": "Blanditiis veniam sed aspernatur ut necessitatibus quae.",
      "repository_path": "",
      "repository_ref": "<+stage.variables.REF>",
      "repository_sha": "abc10ed"
    }
  ],
  "terraform_variables": {
    "Minus commodi id qui vel iste assumenda.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    },
    "Sit debitis deserunt atque aut facilis.": {
      "key": "iow",
      "value": "Id nobis praesentium aut velit blanditiis non.",
      "value_type": "number"
    }
  },
  "terragrunt_provider": false,
  "terragrunt_version": "Placeat minus cumque quis modi.",
  "updated_at": 2353188073938450000,
  "variable_sets": [
    "Ullam sit corrupti earum dolor placeat.",
    "In repudiandae.",
    "Voluptatem voluptates ex et."
  ]
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      }
    ],
    "entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "id": 123,
    "input": "",
    "org_id": "test-org",
    "project_id": "test-project",
    "status": "error",
    "type": "pipeline,service"
  }
}

Destroy workspace

delete

Deletes the given workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 74
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: jd
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: 6rm
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ar
Responses
204

No Content response.

No content

delete/api/orgs/{org}/projects/{project}/workspaces/{identifier}
DELETE /api/orgs/{org}/projects/{project}/workspaces/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: ar
Accept: */*

No content

Unlock workspace

post

Unlock a workspace, removing the lock regardless of its origin (manual or automatic). Idempotent.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: qmk
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7n9
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: mn
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0qy
Responses
200

OK response.

No content

post/api/orgs/{org}/projects/{project}/workspaces/{identifier}/actions/force-unlock
POST /api/orgs/{org}/projects/{project}/workspaces/{identifier}/actions/force-unlock HTTP/1.1
Host: localhost:80
Harness-Account: 0qy
Accept: */*

No content

Lock workspace

post

Create a manual lock on a workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: r2
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: e
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: h
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: dq
Body
reasonstring · max: 1024Optional

Reason for locking the workspace (optional, max 1024 characters)

Example: Q2 freeze
Responses
200

OK response.

application/json
idstring · uuidRequired

Lock ID

Example: 12727878-e854-42d4-bbf0-2be9bf8fed70
locked_by_display_namestringRequired

Display name of who locked

Example: Consequatur occaecati repellat dolorem iusto quae.
locked_by_principal_idstringRequired

Principal ID who locked

Example: Vel molestias labore labore.
locked_by_principal_typestringRequired

Type of principal

Example: Sapiente autem quisquam et ducimus voluptates rerum.
manualbooleanRequired

Whether the lock is manual (user-initiated). true = manual lock, false = automatic lock

Example: true
reasonstringRequired

Reason for lock

Example: Qui qui.
workspacestringRequired

Workspace identifier

Example: Voluptas possimus molestiae molestiae.
post/api/orgs/{org}/projects/{project}/workspaces/{identifier}/actions/lock
POST /api/orgs/{org}/projects/{project}/workspaces/{identifier}/actions/lock HTTP/1.1
Host: localhost:80
Harness-Account: dq
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "reason": "Q2 freeze"
}
{
  "id": "4e2c2af4-20d5-4fda-8508-81a4691a8e4d",
  "locked_by_display_name": "Officiis expedita libero accusantium ipsam repellendus quas.",
  "locked_by_principal_id": "Accusamus deserunt dignissimos eligendi nesciunt necessitatibus tempora.",
  "locked_by_principal_type": "Sed aut omnis.",
  "manual": false,
  "reason": "Ea natus voluptatem.",
  "workspace": "Similique quam rerum sed voluptatem est."
}

List modules

get

List modules associated with this workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 17b
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 8
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: d
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: e3
Responses
200

OK response.

application/json

Represents an individual OpenTofu or Terraform module.

invocationsinteger · int64Required

Number of times this module is invoked in the workspace

Example: 3
keystringRequired

Module key

Example: ec2-instance_test
sourcestringRequired

Module source

Example: registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete
stack_pathstringOptional

Terragrunt stack path (empty for regular Terraform workspaces)

Example: environments/prod/ec2
versionstringRequired

Module version

Example: 5.0.0
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}/modules
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier}/modules HTTP/1.1
Host: localhost:80
Harness-Account: e3
Accept: */*
[
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  },
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  },
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  },
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  }
]

Get resource graph

get

Return the applied resource graph for a workspace. With no query, the response is the resource graph when it fits the size limit and a module summary when it does not. module expands one module. focus expands one resource and its direct dependencies. Resource attributes are omitted.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: gx
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: g
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: t9
Query parameters
modulestringOptional

Module address to expand, such as root or module.network.

Example: Delectus eligendi quia et sunt eaque distinctio.
path_idstringOptional

Stack path of the module to expand. Empty for a single-root workspace. Requires module.

Example: Autem placeat.
focusstring · uuidOptional

Resource UUID to expand by one hop.

Example: 2d9b3898-561e-410b-ac2b-9286bc4737a9
depthinteger · int64 · min: 1 · max: 1Optional

Neighborhood distance when focus is set. Only 1 is supported.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 1w
Responses
200

OK response.

application/json
truncatedbooleanRequired

True when another request can expand this response into a smaller slice.

Example: false
viewstring · enumRequired

Representation contained in nodes and edges.

Example: resourcesPossible values:
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}/resource-graph
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier}/resource-graph HTTP/1.1
Host: localhost:80
Harness-Account: 1w
Accept: */*
{
  "edges": [
    {
      "attributes": [
        "vpc_id"
      ],
      "source": "11111111-1111-1111-1111-111111111111",
      "target": "22222222-2222-2222-2222-222222222222"
    },
    {
      "attributes": [
        "vpc_id"
      ],
      "source": "11111111-1111-1111-1111-111111111111",
      "target": "22222222-2222-2222-2222-222222222222"
    },
    {
      "attributes": [
        "vpc_id"
      ],
      "source": "11111111-1111-1111-1111-111111111111",
      "target": "22222222-2222-2222-2222-222222222222"
    }
  ],
  "nodes": [
    {
      "address": "aws_subnet.private[0]",
      "drift_status": "unchanged",
      "id": "11111111-1111-1111-1111-111111111111",
      "mode": "managed",
      "module": "root",
      "name": "private[0]",
      "path_id": "dev",
      "provider": "registry.terraform.io/hashicorp/aws",
      "resource_count": 2413488699199516700,
      "stub": true,
      "type": "aws_subnet"
    },
    {
      "address": "aws_subnet.private[0]",
      "drift_status": "unchanged",
      "id": "11111111-1111-1111-1111-111111111111",
      "mode": "managed",
      "module": "root",
      "name": "private[0]",
      "path_id": "dev",
      "provider": "registry.terraform.io/hashicorp/aws",
      "resource_count": 2413488699199516700,
      "stub": true,
      "type": "aws_subnet"
    },
    {
      "address": "aws_subnet.private[0]",
      "drift_status": "unchanged",
      "id": "11111111-1111-1111-1111-111111111111",
      "mode": "managed",
      "module": "root",
      "name": "private[0]",
      "path_id": "dev",
      "provider": "registry.terraform.io/hashicorp/aws",
      "resource_count": 2413488699199516700,
      "stub": true,
      "type": "aws_subnet"
    },
    {
      "address": "aws_subnet.private[0]",
      "drift_status": "unchanged",
      "id": "11111111-1111-1111-1111-111111111111",
      "mode": "managed",
      "module": "root",
      "name": "private[0]",
      "path_id": "dev",
      "provider": "registry.terraform.io/hashicorp/aws",
      "resource_count": 2413488699199516700,
      "stub": true,
      "type": "aws_subnet"
    }
  ],
  "truncated": true,
  "view": "resources"
}

List resources

get

List resources associated with this workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: no
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: r
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: 29
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page. When omitted, all records are returned.

Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'. When omitted, all records are returned.

Example: 1
resource_typesstring[]Optional

Resource types to filter by.

Example: ["aws_instance","google_compute_instance"]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: m
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources HTTP/1.1
Host: localhost:80
Harness-Account: m
Accept: */*
{
  "data_sources": [
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    }
  ],
  "outputs": [
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    },
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    },
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    }
  ],
  "resources": [
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    }
  ],
  "stack_outputs": {
    "IaCM/TGOverride/environments/dev/ec2": [
      {
        "name": "instance_id",
        "sensitive": false,
        "stack_path": "IaCM/TGOverride/environments/dev/ec2",
        "value": "i-1234567890abcdef0"
      }
    ]
  },
  "total_resources": 42
}

Get resource

get

Get a single provisioned resource by its IaCM resource ID (resources.id UUID). Returns the same Resource shape as list-resources.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 55
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: c
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: z
idstring · min: 1 · max: 36Required

IaCM resource ID (resources.id UUID).

Example: 11111111-1111-1111-1111-111111111111
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 2n
Responses
200

OK response.

application/json
createdAtinteger · int64Optional

Timestamp when the resource was created.

Example: 1627590400
drift_statusstring · enumRequired

Indicates if this resource is experiencing drift.

Example: changedPossible values:
lastSyncedAtinteger · int64Optional

Timestamp when the resource was last updated.

Example: 1627686800
modestring · enumRequired

Mode associated with the resource.

Example: resourcePossible values:
modulestringRequired

Module associated with the resource.

Example: full_stack
monthly_costnumber · doubleOptional

Current period cost from CCM (null if no cost data).

Example: 0.17405730020868984
monthly_savingnumber · doubleOptional

Monthly potential saving from CCM (null if no cost data).

Example: 0.21305224557853683
namestringRequired

Name associated with the resource.

Example: app_server
path_idstringRequired

Path associated with the resource. Could be namespace, environment or stack id.

Example: namespace
providerstringRequired

Cloud provider associated with the resource.

Example: AWS
recommendation_countinteger · int64Optional

Number of CCM recommendations for this resource (null if no cost data).

Example: 6719760703679275000
resource_idstringRequired

Unique identifier for the resource from the cloud provider.

Example: arn:aws:s3:::my-bucket
typestringRequired

Type of the provisioned resource.

Example: S3 Bucket
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources/{id}
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources/{id} HTTP/1.1
Host: localhost:80
Harness-Account: 2n
Accept: */*
{
  "attributes": {
    "ami": "ami-830c94ec",
    "instance_type": "t2.micro"
  },
  "createdAt": 1627590400,
  "drift_attributes": {
    "instance_type": "t2.nano"
  },
  "drift_status": "changed",
  "lastSyncedAt": 1627686800,
  "mode": "resource",
  "module": "full_stack",
  "monthly_cost": 0.5739923905487929,
  "monthly_saving": 0.08183214308009837,
  "name": "app_server",
  "path_id": "namespace",
  "provider": "AWS",
  "recommendation_count": 2053648467760526000,
  "resource_id": "arn:aws:s3:::my-bucket",
  "sensitive_attributes": [
    "instance_type"
  ],
  "type": "S3 Bucket"
}

List resources using selectors

post

List resources for a workspace using selectors. Pagination is optional: when limit and page are omitted (or zero), all matching resources are returned for backward compatibility.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: g
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: hz
identifierstringRequired

Workspace identifier

Example: Esse vel est quisquam.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7qx
Body
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page. When omitted, all records are returned.

Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'. When omitted, all records are returned.

Example: 1
Responses
200

OK response.

application/json
post/api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources/search
POST /api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources/search HTTP/1.1
Host: localhost:80
Harness-Account: 7qx
Content-Type: application/json
Accept: */*
Content-Length: 578

{
  "limit": 30,
  "page": 1,
  "selectors": [
    {
      "include_conditions": [
        {
          "attribute": "tag.environment",
          "operator": "equals",
          "value": "prod"
        }
      ],
      "path_id": "qa",
      "provider": "aws",
      "resource_type": "aws_instance",
      "search_text": "some text"
    },
    {
      "include_conditions": [
        {
          "attribute": "tag.environment",
          "operator": "equals",
          "value": "prod"
        }
      ],
      "path_id": "qa",
      "provider": "aws",
      "resource_type": "aws_instance",
      "search_text": "some text"
    },
    {
      "include_conditions": [
        {
          "attribute": "tag.environment",
          "operator": "equals",
          "value": "prod"
        }
      ],
      "path_id": "qa",
      "provider": "aws",
      "resource_type": "aws_instance",
      "search_text": "some text"
    }
  ]
}
{
  "data_sources": [
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    }
  ],
  "outputs": [
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    },
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    },
    {
      "expression": "<+outputs.instance_id>",
      "name": "instance_public_ip",
      "sensitive": true,
      "stack_path": "IaCM/TGOverride/environments/dev/ec2",
      "value": "Temporibus iusto porro amet."
    }
  ],
  "resources": [
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    },
    {
      "attributes": {
        "ami": "ami-830c94ec",
        "instance_type": "t2.micro"
      },
      "createdAt": 1627590400,
      "drift_attributes": {
        "instance_type": "t2.nano"
      },
      "drift_status": "changed",
      "lastSyncedAt": 1627686800,
      "mode": "resource",
      "module": "full_stack",
      "monthly_cost": 0.01905283111564605,
      "monthly_saving": 0.32511100926090114,
      "name": "app_server",
      "path_id": "namespace",
      "provider": "AWS",
      "recommendation_count": 3315473753417558000,
      "resource_id": "arn:aws:s3:::my-bucket",
      "sensitive_attributes": [
        "instance_type"
      ],
      "type": "S3 Bucket"
    }
  ],
  "stack_outputs": {
    "IaCM/TGOverride/environments/dev/ec2": [
      {
        "name": "instance_id",
        "sensitive": false,
        "stack_path": "IaCM/TGOverride/environments/dev/ec2",
        "value": "i-1234567890abcdef0"
      }
    ]
  },
  "total_resources": 42
}

Get VCS auto-plan automation status for a workspace

get

Returns whether auto-plan webhooks are enabled and related metadata.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: f
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: m3
workspacestringRequired

Workspace identifier

Example: Explicabo non tenetur ea ipsam.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: gk
Responses
200

OK response.

application/json
commit_automationbooleanOptionalExample: false
commit_trigger_idstringOptional

Harness trigger ID for commit auto-plan

Example: Quia molestiae repellat et.
enabledbooleanRequiredExample: true
last_updatedinteger · int64Optional

Unix milliseconds of the last trigger mapping update

Example: 838020437005263600
pipeline_idstringOptionalExample: Earum tempore voluptates rerum.
pr_automationbooleanOptionalExample: false
pr_open_trigger_idstringOptional

Harness trigger ID for pull-request auto-plan

Example: Recusandae voluptas debitis.
statusstringOptional

Trigger mapping status: active, pending_update, or failed

Example: Laborum suscipit ad molestiae deserunt quos.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config HTTP/1.1
Host: localhost:80
Harness-Account: gk
Accept: */*
{
  "commit_automation": false,
  "commit_trigger_id": "Rerum ipsam molestiae nesciunt aut.",
  "enabled": true,
  "last_updated": 2783884540902830600,
  "pipeline_id": "Quos quia.",
  "pr_automation": false,
  "pr_open_trigger_id": "Et sunt perferendis excepturi aut.",
  "status": "Aut recusandae ex."
}

Enable VCS auto-plan automation for a workspace

put

Creates Harness webhook triggers that run the workspace plan pipeline on pull-request open/update and on commits to the tracked branch. Git provider, connector, and repo are taken from the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: hx
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 54
workspacestringRequired

Workspace identifier

Example: Rerum dolores vitae adipisci ad sint eum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: br
Body
commit_automationbooleanOptional

Create the commit/synchronize plan trigger

Default: trueExample: false
pipeline_idstringRequired

Pipeline to run for auto-plan

Example: Quam tempora et perspiciatis.
pr_automationbooleanOptional

Create the pull-request plan trigger

Default: trueExample: true
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Ipsa tempora.
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config HTTP/1.1
Host: localhost:80
Harness-Account: br
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "commit_automation": true,
  "pipeline_id": "Quasi sed nihil sunt atque.",
  "pr_automation": false
}
{
  "status": "Est aspernatur officia eos tempora debitis."
}

Disable VCS auto-plan automation for a workspace

delete

Removes auto-plan webhook triggers for the workspace. Failed Harness deletes are queued for retry.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: g
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: l7l
workspacestringRequired

Workspace identifier

Example: Error necessitatibus officiis ullam.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0u
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Magnam quis deleniti.
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-plan-config HTTP/1.1
Host: localhost:80
Harness-Account: 0u
Accept: */*
{
  "status": "Voluptas dolorem et tenetur."
}

Get VCS auto-provision automation status for a workspace

get

Returns whether auto-provision webhooks are enabled and related metadata.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: t2m
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: o
workspacestringRequired

Workspace identifier

Example: Corrupti atque iusto expedita.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 23
Responses
200

OK response.

application/json
enabledbooleanRequiredExample: false
last_updatedinteger · int64Optional

Unix milliseconds of the last trigger mapping update

Example: 5288704161099646000
pipeline_idstringOptionalExample: Quia assumenda voluptas error.
statusstringOptional

Trigger mapping status: active, pending_update, or failed

Example: Mollitia modi recusandae dolores.
trigger_idstringOptional

Harness trigger ID for merged-PR auto-provision

Example: Quis aut quia.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config HTTP/1.1
Host: localhost:80
Harness-Account: 23
Accept: */*
{
  "enabled": false,
  "last_updated": 6322170784640343000,
  "pipeline_id": "Autem odio qui possimus est.",
  "status": "Reprehenderit nihil.",
  "trigger_id": "Molestiae in nostrum."
}

Enable VCS auto-provision automation for a workspace

put

Creates a Harness webhook trigger that runs the workspace apply pipeline when a pull request is merged. Git provider, connector, and repo are taken from the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 9n
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5h
workspacestringRequired

Workspace identifier

Example: Error possimus.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: m
Body
pipeline_idstringRequired

Pipeline to run for auto-provision

Example: Nisi nihil.
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Aliquid et.
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config HTTP/1.1
Host: localhost:80
Harness-Account: m
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "pipeline_id": "Perspiciatis ipsam."
}
{
  "status": "Quaerat aut quia non totam dolorem."
}

Disable VCS auto-provision automation for a workspace

delete

Removes the auto-provision webhook trigger for the workspace. Failed Harness deletes are queued for retry.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: huy
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: ca
workspacestringRequired

Workspace identifier

Example: Dolorem beatae accusantium modi adipisci.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Dolor eveniet laborum ut cumque libero.
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/auto-provision-config HTTP/1.1
Host: localhost:80
Harness-Account: 7
Accept: */*
{
  "status": "Eum quo ea nesciunt commodi omnis."
}

Clone workspace

post

Clone the given workspace with new name.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: u5u
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 02
workspacestringRequiredExample: Nesciunt dolorem temporibus animi molestiae et vero.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8
Body
identifierstring · min: 1 · max: 128Required

Workspace identifier.

Example: oPattern: ^[A-Za-z_][A-Za-z0-9_-]*$
namestring · min: 1 · max: 128Required

Name is the human readable name for the resource.

Example: resource namePattern: ^[A-Za-z_][A-Za-z0-9_ -]*$
Responses
200

OK response.

application/json

Create-WorkspaceResponseBody result type (default view)

post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone HTTP/1.1
Host: localhost:80
Harness-Account: 8
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "identifier": "bbw",
  "name": "resource name"
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      }
    ],
    "entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
    "id": 123,
    "input": "",
    "org_id": "test-org",
    "project_id": "test-project",
    "status": "error",
    "type": "pipeline,service"
  }
}

List data

get

List all stored data for a workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 1oe
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: md0
workspacestringRequired

Workspace identifier

Example: Quia ut dolore natus voluptatem quibusdam molestiae.
Query parameters
pipeline_execution_idstringOptional

Filter by pipeline execution ID

Example: Est ducimus eos deserunt.
pipeline_stage_idstringOptional

Filter by pipeline execution stage ID

Example: Et est temporibus id quo.
provisioner_typestringOptional

Filter by provisioner type

Example: Asperiores voluptate odit.
data_typestringOptional

Filter by data type

Example: Vel voluptatibus.
stack_pathstringOptional

Filter by stack path

Example: Tenetur aut quia.
limitinteger · int64 · min: 1 · max: 1000Optional

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

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

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

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: sdl
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/data
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/data HTTP/1.1
Host: localhost:80
Harness-Account: sdl
Accept: */*
[
  {
    "account": "q3",
    "created": 6540489608371019000,
    "data_type": "cdk_tree",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "org": "q",
    "pipeline_execution_id": "Rem nesciunt dolorum hic.",
    "pipeline_id": "Sint sit dolor laborum eum nemo ut.",
    "pipeline_stage_id": "Optio laborum modi voluptate.",
    "project": "g",
    "provisioner_type": "awscdk",
    "stack_path": "Ipsum numquam dolorum ea voluptatibus velit rem.",
    "stage_id": "Et ducimus a distinctio.",
    "workspace": "workspace123"
  },
  {
    "account": "q3",
    "created": 6540489608371019000,
    "data_type": "cdk_tree",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "org": "q",
    "pipeline_execution_id": "Rem nesciunt dolorum hic.",
    "pipeline_id": "Sint sit dolor laborum eum nemo ut.",
    "pipeline_stage_id": "Optio laborum modi voluptate.",
    "project": "g",
    "provisioner_type": "awscdk",
    "stack_path": "Ipsum numquam dolorum ea voluptatibus velit rem.",
    "stage_id": "Et ducimus a distinctio.",
    "workspace": "workspace123"
  }
]

Create data

post

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

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: d5
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: f
workspacestringRequired

Workspace identifier

Example: workspace123
Query parameters
pipeline_idstringRequired

The unique identifier for the associated pipeline

Example: Ipsa perspiciatis dolor ad.
stage_idstringRequired

The unique identifier for a stage

Example: Quae dolores aspernatur.
pipeline_execution_idstringRequired

The unique identifier for the associated pipeline execution

Example: Delectus ipsa alias in accusamus.
pipeline_stage_idstringRequired

The unique identifier for the associated pipeline execution stage

Example: Eos reprehenderit qui consectetur.
provisioner_typestring · enumRequired

Type of provisioner that created the data

Example: awscdkPossible values:
data_typestring · enumRequired

Type of data stored

Example: cdk_templatePossible values:
policy_actionstringOptional

Policy action used during OPA evaluation

Example: afterTerraformApply
opa_sdk_supportedbooleanOptional

Indicates the plugin supports OPA SDK-based evaluation

Example: false
stack_pathstringOptional

Optional path to the stack module

Example: Voluptatem dolores in.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5l
Content-Lengthinteger · int64Optional

Size in bytes of the data.

Example: 8677490156942426000
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
policy_evaluation_messagestringOptional

Pre-rendered message included when policy evaluation did not pass

Example: - instance type 'xlarge' is not permitted
policy_evaluation_statusstring · enumOptional

The overall status of policy evaluation (if it occurred) indicating whether it passed

Example: errorPossible values:
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/data
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/data?pipeline_id=Ipsa+perspiciatis+dolor+ad.&stage_id=Quae+dolores+aspernatur.&pipeline_execution_id=Delectus+ipsa+alias+in+accusamus.&pipeline_stage_id=Eos+reprehenderit+qui+consectetur.&provisioner_type=awscdk&data_type=cdk_template HTTP/1.1
Host: localhost:80
Harness-Account: 5l
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "policy_evaluation": [
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    }
  ],
  "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  "policy_evaluation_status": "error"
}

Show data

get

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

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 4
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: vx
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Dolorum dolorem.
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: z
Responses
200

OK response.

application/json
string · binaryOptional
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/data/{id}
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/data/{id} HTTP/1.1
Host: localhost:80
Harness-Account: z
Accept: */*
binary

Evaluate data

get

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

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: jdu
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: z
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Rerum expedita ut quaerat impedit velit.
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Query parameters
pipeline_execution_idstringOptional

Pipeline execution associated with this evaluation

Example: Facere nobis qui perspiciatis expedita ea et.
policy_actionstringRequired

Policy action used during OPA evaluation

Example: afterTerraformApply
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 6bq
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
policy_evaluation_messagestringOptional

Pre-rendered message included when policy evaluation did not pass

Example: - instance type 'xlarge' is not permitted
policy_evaluation_statusstring · enumOptional

The overall status of policy evaluation (if it occurred) indicating whether it passed

Example: errorPossible values:
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/data/{id}/evaluate-policy
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/data/{id}/evaluate-policy?policy_action=afterTerraformApply HTTP/1.1
Host: localhost:80
Harness-Account: 6bq
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "policy_evaluation": [
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    }
  ],
  "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  "policy_evaluation_status": "error"
}

Upload dependency graph data

post

Upload dependency graph for an existing plan file.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: fb
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: r3
workspacestringRequired

Workspace identifier

Example: workspace123
Query parameters
pipeline_idstringRequired

The unique identifier for the associated pipeline

Example: Ut et consequatur neque nam est.
stage_idstringRequired

The unique identifier for a stage

Example: Fugiat minima perferendis omnis animi molestias enim.
pipeline_execution_idstringRequired

The unique identifier for the associated pipeline execution

Example: Non quia deserunt quas asperiores beatae.
pipeline_stage_idstringRequired

The unique identifier for the associated pipeline execution stage

Example: Maxime molestiae optio reprehenderit.
provisioner_typestring · enumRequired

Type of provisioner that created the data

Example: awscdkPossible values:
data_typestring · enumRequired

Type of data stored

Example: cdk_treePossible values:
stack_pathstringOptional

Optional path to the stack module

Example: Enim saepe.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: u
Content-Lengthinteger · int64Optional

Size in bytes of the graph data.

Example: 2777861322887190500
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
policy_evaluation_messagestringOptional

Pre-rendered message included when policy evaluation did not pass

Example: - instance type 'xlarge' is not permitted
policy_evaluation_statusstring · enumOptional

The overall status of policy evaluation (if it occurred) indicating whether it passed

Example: errorPossible values:
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/dependency-graph
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/dependency-graph?pipeline_id=Ut+et+consequatur+neque+nam+est.&stage_id=Fugiat+minima+perferendis+omnis+animi+molestias+enim.&pipeline_execution_id=Non+quia+deserunt+quas+asperiores+beatae.&pipeline_stage_id=Maxime+molestiae+optio+reprehenderit.&provisioner_type=awscdk&data_type=cdk_tree HTTP/1.1
Host: localhost:80
Harness-Account: u
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "policy_evaluation": [
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    }
  ],
  "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  "policy_evaluation_status": "error"
}

Get drift automation status for a workspace

get

Returns whether drift automation is enabled and related metadata.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: b
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: us
workspacestringRequired

Workspace identifier

Example: Omnis omnis itaque suscipit eaque.
Query parameters
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Possimus qui.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: e
Responses
200

OK response.

application/json
enabledbooleanRequiredExample: false
pipeline_idstringOptionalExample: Quibusdam nostrum est.
run_everyinteger · int64Optional

Repeat interval; set when schedule is configured

Example: 7878648940724830000
run_every_unitstring · enumOptional

hours or days

Example: daysPossible values:
trigger_idstringOptionalExample: Voluptatem pariatur quis.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config HTTP/1.1
Host: localhost:80
Harness-Account: e
Accept: */*
{
  "enabled": false,
  "pipeline_id": "Unde omnis et dolor non.",
  "run_every": 7260470872493344000,
  "run_every_unit": "hours",
  "trigger_id": "Nihil nobis qui."
}

Enable drift automation for a workspace

put

Configures drift detection pipeline and schedule for the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: g
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: luk
workspacestringRequired

Workspace identifier

Example: Esse est rem.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: cz
Body
pipeline_idstringRequired

Pipeline to run for drift detection

Example: Qui qui velit dolorem et ad.
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Dolore natus magni ratione.
run_everyinteger · int64Required

Run drift detection every N hours or N days (see run_every_unit)

Example: 8584009500598941000
run_every_unitstring · enumRequired

hours or days

Example: minutesPossible values:
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Nisi architecto.
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config HTTP/1.1
Host: localhost:80
Harness-Account: cz
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "pipeline_id": "Blanditiis eius quia.",
  "provisioner": "Iste sunt aut.",
  "run_every": 270202010415451300,
  "run_every_unit": "hours"
}
{
  "status": "Quod eum."
}

Disable drift automation for a workspace

delete

Removes drift scheduling and related configuration for the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ka
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7
workspacestringRequired

Workspace identifier

Example: Quis autem recusandae eos id aut ea.
Query parameters
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Fuga animi aut placeat necessitatibus minus dolores.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Et expedita quibusdam consequatur molestiae sunt et.
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config HTTP/1.1
Host: localhost:80
Harness-Account: 8
Accept: */*
{
  "status": "Id inventore quasi."
}

Get ephemeral TTL status for a workspace

get

Returns whether ephemeral TTL is enabled and related metadata.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 9dg
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: ol
workspacestringRequired

Workspace identifier

Example: Ipsum rerum animi itaque.
Query parameters
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Sint aut.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: bv0
Responses
200

OK response.

application/json
delete_atstringOptional

Scheduled deletion timestamp (ISO 8601)

Example: Aperiam fuga.
delete_delay_unitstring · enumOptional

Configured delete delay unit (hours or days)

Example: daysPossible values:
delete_delay_valueinteger · int64Optional

Configured delete delay value (when delete_workspace is true)

Example: 8330355675284791000
delete_on_datestringOptional

Configured delete date (YYYY-MM-DD) when schedule uses a specific date

Example: Consectetur magni nam amet sunt rerum.
delete_workspacebooleanOptional

Whether workspace will be deleted after destroy

Example: false
destroy_atstringOptional

Scheduled destruction timestamp (ISO 8601)

Example: Non dicta.
destroy_on_datestringOptional

Configured destroy date (YYYY-MM-DD) when schedule uses a specific date

Example: Qui nam distinctio iure.
enabledbooleanRequiredExample: true
pipeline_idstringOptionalExample: Qui amet necessitatibus ad.
provisionerstringOptional

Provisioner this configuration applies to

Example: Aperiam nulla laudantium in dolorem est.
sourcestring · enumOptional

Origin of the configuration: 'workspace', 'project', or 'disabled'

Example: disabledPossible values:
trigger_idstringOptional

Harness trigger ID for the destroy schedule

Example: Consequatur autem accusamus nihil.
ttl_unitstring · enumOptional

Configured destroy delay unit (hours or days)

Example: daysPossible values:
ttl_valueinteger · int64Optional

Configured destroy delay value (when schedule uses delay)

Example: 633552043677647900
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config HTTP/1.1
Host: localhost:80
Harness-Account: bv0
Accept: */*
{
  "delete_at": "Beatae cum.",
  "delete_delay_unit": "days",
  "delete_delay_value": 3891724312763759600,
  "delete_on_date": "Vel iusto non maiores ex ea.",
  "delete_workspace": true,
  "destroy_at": "Incidunt tempora a tempore.",
  "destroy_on_date": "Quia qui placeat cum nihil voluptas.",
  "enabled": false,
  "pipeline_id": "Similique commodi qui id velit.",
  "provisioner": "Non ut.",
  "source": "project",
  "trigger_id": "Dolor veritatis voluptas.",
  "ttl_unit": "seconds",
  "ttl_value": 5152995014675474000
}

Enable ephemeral TTL for a workspace

put

Configures time-to-live settings to automatically destroy infrastructure and optionally delete the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 7
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 0m
workspacestringRequired

Workspace identifier

Example: Et animi officiis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: f
Body
delete_delay_unitstring · enumOptional

Unit for delete delay

Example: secondsPossible values:
delete_delay_valueinteger · int64Optional

Delete workspace after N hours or days from now

Example: 7383443828328143000
delete_on_datestringOptional

Specific date to delete workspace (ISO 8601 format, e.g. 2026-09-02)

Example: Perferendis totam eum illum.
delete_workspacebooleanOptional

Whether to delete the workspace record after infrastructure is destroyed

Example: true
destroy_delay_unitstring · enumOptional

Unit for destroy delay

Example: daysPossible values:
destroy_delay_valueinteger · int64Optional

Destroy infrastructure after N hours or days from now

Example: 4390518099527992300
destroy_on_datestringOptional

Specific date to destroy infrastructure (ISO 8601 format, e.g. 2026-08-24)

Example: Et qui quasi nihil dolor voluptatibus.
pipeline_idstringRequired

Pipeline to run for destroying infrastructure

Example: Et ab et sunt aut.
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Sapiente unde qui magnam.
Responses
200

OK response.

application/json
delete_atstringOptional

Computed delete timestamp (ISO 8601), empty if delete_workspace is false

Example: Rerum est qui ex qui rem.
destroy_atstringOptional

Computed destroy timestamp (ISO 8601)

Example: Excepturi adipisci ipsum ducimus est architecto molestias.
statusstringRequired

Outcome message

Example: Qui quo in et.
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config HTTP/1.1
Host: localhost:80
Harness-Account: f
Content-Type: application/json
Accept: */*
Content-Length: 393

{
  "delete_delay_unit": "seconds",
  "delete_delay_value": 6333660294114714000,
  "delete_on_date": "Animi qui aspernatur ipsum consequuntur est.",
  "delete_workspace": true,
  "destroy_delay_unit": "minutes",
  "destroy_delay_value": 4228951436843927600,
  "destroy_on_date": "Nemo eaque mollitia natus ipsum.",
  "pipeline_id": "Molestiae et nulla pariatur adipisci.",
  "provisioner": "Explicabo ipsa est deleniti ducimus."
}
{
  "delete_at": "Fugit libero rem.",
  "destroy_at": "Dolore molestias.",
  "status": "Temporibus sed dignissimos aut."
}

Disable ephemeral TTL for a workspace

delete

Removes ephemeral scheduling and related configuration for the workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: by
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: zs3
workspacestringRequired

Workspace identifier

Example: Et vero ut.
Query parameters
provisionerstringOptional

Provisioner key (defaults to opentofu when omitted)

Example: Reiciendis rerum est quia non et blanditiis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: etb
Responses
200

OK response.

application/json
statusstringRequired

Outcome message

Example: Distinctio facere eveniet dicta nobis facere.
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config HTTP/1.1
Host: localhost:80
Harness-Account: etb
Accept: */*
{
  "status": "Est enim est possimus."
}

Send event

post

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

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: f
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: vn
workspacestring · min: 1 · max: 1024Required

Workspace associated with this event

Example: t
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: r
Body
event_typestring · enumRequired

The type of event that occurred

Example: inactivePossible values:
pipeline_execution_idstringOptional

Deprecated: use metadata instead

Default: ""Example: Quia omnis aut et quibusdam tempore ut.
pipeline_stage_idstringOptional

Deprecated: use metadata instead

Default: ""Example: Laboriosam possimus laborum.
Responses
200

OK response.

No content

post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/events
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/events HTTP/1.1
Host: localhost:80
Harness-Account: r
Content-Type: application/json
Accept: */*
Content-Length: 9106

{
  "data": {
    "Libero possimus eum qui voluptas.": "Voluptas nemo sit occaecati molestiae at voluptates."
  },
  "event_type": "drifted",
  "metadata": {
    "PlannedChangesCount": 2311114425189330400,
    "activity_status": "incomplete",
    "activity_type": "import",
    "cost_breakdown_uuid": "Voluptas hic.",
    "cost_currency": "Molestias quia laudantium amet molestiae provident.",
    "cost_diff_total_monthly": "Fugiat vel enim voluptas.",
    "cost_diff_uuid": "Vero est.",
    "cost_past_total_monthly": "Quia fugiat qui eum voluptatem sequi voluptatibus.",
    "cost_total_monthly": "Inventore et qui.",
    "cost_total_monthly_percentage_change": "Reiciendis exercitationem inventore ducimus excepturi.",
    "data_length": 976895326195666800,
    "drift_counts": {
      "added": 9212491354152771000,
      "changed": 703323033953042300,
      "deleted": 868040660597113600,
      "imported": 6499253911078169000,
      "removed": 5875780235693349000,
      "replaced": 1774374459062137600,
      "unchanged": 3936407468113801000
    },
    "enable_solutions_factory": true,
    "git_branch": "Aliquid est est porro.",
    "git_commit_message": "Facere iste qui id.",
    "git_commit_sha": "Qui accusantium.",
    "git_repo": "Magnam alias veritatis animi nobis sint.",
    "modules_uuid": "Vero dignissimos labore soluta.",
    "output_counts": {
      "added": 9212491354152771000,
      "changed": 703323033953042300,
      "deleted": 868040660597113600,
      "imported": 6499253911078169000,
      "removed": 5875780235693349000,
      "replaced": 1774374459062137600,
      "unchanged": 3936407468113801000
    },
    "pipeline": "Dignissimos consectetur voluptate esse sed eveniet sit.",
    "pipeline_execution_id": "Sint quis error nihil.",
    "pipeline_execution_number": "Est earum excepturi ut rerum perspiciatis.",
    "pipeline_name": "Illo libero.",
    "pipeline_stage_id": "Sed voluptas.",
    "pipeline_status": "ERRORED",
    "plan_uuid": "Impedit qui.",
    "providers_uuid": "Nostrum nisi consequuntur rerum.",
    "provisioner": "Ullam tempora rem at iusto dolores amet.",
    "provisioner_version": "Esse est qui.",
    "resource_counts": {
      "added": 9212491354152771000,
      "changed": 703323033953042300,
      "deleted": 868040660597113600,
      "imported": 6499253911078169000,
      "removed": 5875780235693349000,
      "replaced": 1774374459062137600,
      "unchanged": 3936407468113801000
    },
    "rollback_reason": "Qui pariatur quam dicta error iure.",
    "rollback_source_id": "Quae vero ex dolor repellat.",
    "stacks": [
      {
        "assets_uuid": "Consequatur non voluptatem non.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "drift_uuid": "Inventore ut nihil et distinctio quo impedit.",
        "error_message": "Dolores corporis repudiandae ex accusantium delectus sunt.",
        "manifest_uuid": "Blanditiis iusto.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "stack_name": "Perspiciatis rerum ab dolorem.",
        "stack_outputs": {
          "Totam consequatur exercitationem.": "Labore magni."
        },
        "stack_path": "Eligendi dolore ut ut officia voluptas ut.",
        "status": "success",
        "template_uuid": "Rerum laboriosam.",
        "tree_uuid": "Iusto id molestias sit quaerat."
      },
      {
        "assets_uuid": "Consequatur non voluptatem non.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "drift_uuid": "Inventore ut nihil et distinctio quo impedit.",
        "error_message": "Dolores corporis repudiandae ex accusantium delectus sunt.",
        "manifest_uuid": "Blanditiis iusto.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "stack_name": "Perspiciatis rerum ab dolorem.",
        "stack_outputs": {
          "Totam consequatur exercitationem.": "Labore magni."
        },
        "stack_path": "Eligendi dolore ut ut officia voluptas ut.",
        "status": "success",
        "template_uuid": "Rerum laboriosam.",
        "tree_uuid": "Iusto id molestias sit quaerat."
      },
      {
        "assets_uuid": "Consequatur non voluptatem non.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "drift_uuid": "Inventore ut nihil et distinctio quo impedit.",
        "error_message": "Dolores corporis repudiandae ex accusantium delectus sunt.",
        "manifest_uuid": "Blanditiis iusto.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "stack_name": "Perspiciatis rerum ab dolorem.",
        "stack_outputs": {
          "Totam consequatur exercitationem.": "Labore magni."
        },
        "stack_path": "Eligendi dolore ut ut officia voluptas ut.",
        "status": "success",
        "template_uuid": "Rerum laboriosam.",
        "tree_uuid": "Iusto id molestias sit quaerat."
      }
    ],
    "state_checksum": "Qui rerum iusto.",
    "state_uuid": "Ullam aliquid cupiditate dolores.",
    "terragrunt_details": [
      {
        "cost_breakdown_uuid": "Debitis molestiae enim mollitia est consequatur sed.",
        "cost_currency": "Quidem voluptatibus assumenda voluptates et.",
        "cost_diff_total_monthly": "Molestiae veniam.",
        "cost_diff_uuid": "Recusandae officia.",
        "cost_past_total_monthly": "Optio architecto nihil libero.",
        "cost_total_monthly": "Omnis eum fuga sed fugiat deleniti ut.",
        "cost_total_monthly_percentage_change": "Ipsam distinctio fuga.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "output_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "path_id": "Praesentium consectetur earum maiores.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "state_file_link": "Laborum nihil possimus blanditiis enim eius.",
        "status": "Aut veritatis."
      },
      {
        "cost_breakdown_uuid": "Debitis molestiae enim mollitia est consequatur sed.",
        "cost_currency": "Quidem voluptatibus assumenda voluptates et.",
        "cost_diff_total_monthly": "Molestiae veniam.",
        "cost_diff_uuid": "Recusandae officia.",
        "cost_past_total_monthly": "Optio architecto nihil libero.",
        "cost_total_monthly": "Omnis eum fuga sed fugiat deleniti ut.",
        "cost_total_monthly_percentage_change": "Ipsam distinctio fuga.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "output_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "path_id": "Praesentium consectetur earum maiores.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "state_file_link": "Laborum nihil possimus blanditiis enim eius.",
        "status": "Aut veritatis."
      },
      {
        "cost_breakdown_uuid": "Debitis molestiae enim mollitia est consequatur sed.",
        "cost_currency": "Quidem voluptatibus assumenda voluptates et.",
        "cost_diff_total_monthly": "Molestiae veniam.",
        "cost_diff_uuid": "Recusandae officia.",
        "cost_past_total_monthly": "Optio architecto nihil libero.",
        "cost_total_monthly": "Omnis eum fuga sed fugiat deleniti ut.",
        "cost_total_monthly_percentage_change": "Ipsam distinctio fuga.",
        "drift_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "output_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "path_id": "Praesentium consectetur earum maiores.",
        "resource_counts": {
          "added": 9212491354152771000,
          "changed": 703323033953042300,
          "deleted": 868040660597113600,
          "imported": 6499253911078169000,
          "removed": 5875780235693349000,
          "replaced": 1774374459062137600,
          "unchanged": 3936407468113801000
        },
        "state_file_link": "Laborum nihil possimus blanditiis enim eius.",
        "status": "Aut veritatis."
      }
    ],
    "trigger": {
      "Modi nesciunt.": "Accusamus et asperiores porro adipisci rem.",
      "Non delectus.": "Incidunt reiciendis."
    },
    "via_cfn": true
  },
  "pipeline_execution_id": "Adipisci consequatur.",
  "pipeline_stage_id": "Iure praesentium quod."
}

No content

List pipelines

get

List the pipelines where the workspace is been used

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: m
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: n
workspacestringRequired

Workspace identifier

Example: Inventore voluptas quia libero quia dolores tenetur.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

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

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

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

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: x
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/pipelines
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/pipelines HTTP/1.1
Host: localhost:80
Harness-Account: x
Accept: */*
{
  "account": "nz",
  "org": "k8",
  "pipelines": [
    "Debitis dignissimos veritatis rem.",
    "Commodi et suscipit accusamus.",
    "Rerum qui error quibusdam saepe beatae harum."
  ],
  "project": "jsr"
}

Create remote execution

post

Create a remote execution for a workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 3
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: e
workspacestringRequired

The workspace associated with the remote execution.

Example: Sunt labore sed.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: qi
Body
Responses
201

Created response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 9ul
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 1322908114132515000
executedbooleanRequired

The boolean value indicating if the remote execution has been executed.

Example: false
idstring · uuidRequired

The ID of the remote execution.

Example: 54f419f4-a2b9-4683-96ec-4954014097a8
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: v
pipeline_execution_idstringRequired

The pipeline execution ID of the pipeline executing the remote execution

Example: Sunt accusamus culpa ut.
pipeline_execution_urlstringRequired

The pipeline execution URL of the pipeline executing the remote execution

Example: Amet qui numquam necessitatibus et.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: z
sha256_checksumstringRequired

The checksum of the patch file of changes that the remote execution will run against.

Example: Iusto aut occaecati fuga.
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 1145138877143785300
workspacestringRequired

The workspace associated with the remote execution.

Example: Minus fugiat.
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions HTTP/1.1
Host: localhost:80
Harness-Account: qi
Content-Type: application/json
Accept: */*
Content-Length: 440

{
  "custom_arguments": {
    "Dolor eos harum.": [
      "Similique esse.",
      "Et odio.",
      "Maiores atque maxime et.",
      "Ut perspiciatis velit non maxime."
    ],
    "Dolore a dolores qui consequatur et.": [
      "Et consequatur.",
      "Excepturi sint.",
      "Eius nisi quis enim doloremque ullam."
    ],
    "Ut eum quo quod unde eligendi distinctio.": [
      "Velit quia incidunt quo.",
      "Culpa qui esse doloribus quasi cumque veniam.",
      "Et dolores quia iusto.",
      "Quibusdam consequatur id sint possimus."
    ]
  }
}
{
  "account": "1",
  "created": 5378511880025979000,
  "custom_arguments": {
    "Laudantium qui et consectetur eum aut excepturi.": [
      "Explicabo et tempora qui hic tempore.",
      "Explicabo laboriosam ipsa autem vero qui.",
      "Nostrum ut sit veritatis labore eveniet animi.",
      "Veritatis aut dolorum magnam blanditiis voluptas rem."
    ],
    "Ut ut exercitationem neque.": [
      "Aut nemo consequatur doloremque.",
      "Fugit maxime ea dolor aperiam repellendus.",
      "Distinctio reiciendis id."
    ]
  },
  "executed": true,
  "id": "3477c581-057b-44d7-bcf4-58a24e0d36e2",
  "org": "06",
  "pipeline_execution_id": "Modi beatae earum totam architecto sunt.",
  "pipeline_execution_url": "In qui cupiditate ullam non cum aut.",
  "project": "sub",
  "sha256_checksum": "Vel eligendi.",
  "updated": 965218394187895800,
  "workspace": "Voluptas recusandae corporis quia."
}

Show remote execution

get

Find remote execution

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 9
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: i
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Et est qui.
idstring · uuidRequired

The ID of the remote execution

Example: 0518da1e-75e5-41ee-be9e-c1c2dd450112
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8xc
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 1108939360378850400
executedbooleanRequired

The boolean value indicating if the remote execution has been executed.

Example: true
idstring · uuidRequired

The ID of the remote execution.

Example: 9fbd8e86-3ee8-4494-8c2a-09925faf868d
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: lu
pipeline_execution_idstringRequired

The pipeline execution ID of the pipeline executing the remote execution

Example: Sint sequi minima ea unde.
pipeline_execution_urlstringRequired

The pipeline execution URL of the pipeline executing the remote execution

Example: Id sapiente repudiandae inventore explicabo non et.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: pok
sha256_checksumstringRequired

The checksum of the patch file of changes that the remote execution will run against.

Example: Cupiditate doloribus quos voluptatem repellendus odit corrupti.
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 5550271567224742000
workspacestringRequired

The workspace associated with the remote execution.

Example: Cum qui aut iure dolor maiores nesciunt.
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id} HTTP/1.1
Host: localhost:80
Harness-Account: 7
Accept: */*
{
  "account": "3n9",
  "created": 6805642675775401000,
  "custom_arguments": {
    "Ratione optio quidem maiores.": [
      "Cum quidem ipsam suscipit impedit aliquam voluptate.",
      "Fugit officiis minima."
    ]
  },
  "executed": true,
  "id": "3a174f85-9c78-4a85-9178-7a6742a474ad",
  "org": "4t",
  "pipeline_execution_id": "Quae necessitatibus sit molestiae ea veniam.",
  "pipeline_execution_url": "Eaque debitis rerum magni.",
  "project": "emo",
  "sha256_checksum": "Consequatur rerum cupiditate labore aut autem optio.",
  "updated": 8648771079413247000,
  "workspace": "Vel delectus labore."
}

Download remote execution

get

Download the source code for the remote plan.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: k8
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: vl
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Et ut.
idstring · uuidRequired

The ID of the remote execution

Example: e30e0e7e-8f39-46c8-9bad-b295820e5756
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5
Responses
200

OK response.

application/json
Responsestring · binary
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/download
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/download HTTP/1.1
Host: localhost:80
Harness-Account: 5
Accept: */*
binary

execute-remote-execution workspaces

post

Execute the remote execution

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ri6
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7t
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Voluptatibus rerum qui laboriosam placeat.
idstring · uuidRequired

The ID of the remote execution

Example: f06f425b-8069-4b5c-b4ef-50b6ff9c2d31
Query parameters
operationstring · enumOptional

The default pipeline to run: plan (terraform, opentofu, terragrunt; the default) or synth or diff (awscdk; required).

Example: synthPossible values:
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5k
Responses
200

OK response.

application/json

remote execution details for a specific workspace.

accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: tpy
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 1421298059128841000
executedbooleanRequired

The boolean value indicating if the remote execution has been executed.

Example: true
idstring · uuidRequired

The ID of the remote execution.

Example: 4bac360f-1c3d-4007-a913-af02e08d779a
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: l7
pipeline_execution_idstringRequired

The pipeline execution ID of the pipeline executing the remote execution

Example: Eos id velit.
pipeline_execution_urlstringRequired

The pipeline execution URL of the pipeline executing the remote execution

Example: Sed consectetur dolor expedita ipsam vel.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: dnt
sha256_checksumstringRequired

The checksum of the patch file of changes that the remote execution will run against.

Example: Et illo accusantium aut.
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 6514716918660339000
workspacestringRequired

The workspace associated with the remote execution.

Example: Id non nesciunt in.
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/execute
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/execute HTTP/1.1
Host: localhost:80
Harness-Account: 5k
Accept: */*
{
  "account": "sn",
  "created": 1299081984574952000,
  "custom_arguments": {
    "A expedita non nulla ut et.": [
      "Corporis excepturi non ut.",
      "Aut saepe minus debitis quaerat debitis."
    ]
  },
  "executed": true,
  "id": "9a83acf7-a517-4ada-9f03-fd5ee668a131",
  "org": "qes",
  "pipeline_execution_id": "Dolorem delectus itaque culpa et id qui.",
  "pipeline_execution_url": "Et rem sed natus sunt non.",
  "project": "9",
  "sha256_checksum": "Et quaerat ullam explicabo.",
  "updated": 5915072540698716000,
  "workspace": "Expedita quis recusandae."
}

Upload remote execution source

post

Upload the source code for the remote execution.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 1r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5x
workspacestringRequired

Workspace is the resource workspace this variable is associated with.

Example: Molestiae enim voluptates voluptatem.
idstring · uuidRequired

The ID of the remote execution

Example: d801785a-82b2-4084-bc4a-de9a9ac67214
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: y8q
Content-Lengthinteger · int64Optional

Size in bytes of the source code.

Example: 4469388826800512500
Content-DigeststringRequired

Content-Digest header as defined in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Digest. Sha256 is the only supported algorithm.

Example: Atque quas consequatur.
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 52
createdinteger · int64Required

Created is the unix timestamp at which the resource was originally created in milliseconds.

Example: 3132701670604299300
executedbooleanRequired

The boolean value indicating if the remote execution has been executed.

Example: false
idstring · uuidRequired

The ID of the remote execution.

Example: b1c85809-f3f4-427e-b8fe-48ad6854ada5
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: p
pipeline_execution_idstringRequired

The pipeline execution ID of the pipeline executing the remote execution

Example: Atque autem minima quos ullam.
pipeline_execution_urlstringRequired

The pipeline execution URL of the pipeline executing the remote execution

Example: Nostrum ut enim voluptate.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: u
sha256_checksumstringRequired

The checksum of the patch file of changes that the remote execution will run against.

Example: Sint officia et.
updatedinteger · int64Required

Modified is the unix timestamp at which the resource was last modified in milliseconds.

Example: 4468695751509290000
workspacestringRequired

The workspace associated with the remote execution.

Example: Et nobis est ea illo eveniet eos.
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/upload
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/remote-executions/{id}/upload HTTP/1.1
Host: localhost:80
Harness-Account: y8q
Content-Digest: Atque quas consequatur.
Accept: */*
{
  "account": "0",
  "created": 3882579926984203300,
  "custom_arguments": {
    "Possimus maxime neque eius.": [
      "Molestiae inventore repellendus.",
      "Maxime vel aut autem."
    ]
  },
  "executed": true,
  "id": "d3c21879-33c7-4f04-afb9-a1e0ecdb00d1",
  "org": "5p",
  "pipeline_execution_id": "Voluptatibus ut excepturi rerum corrupti reprehenderit libero.",
  "pipeline_execution_url": "Architecto aut.",
  "project": "r",
  "sha256_checksum": "Magni tenetur ut quam sit asperiores.",
  "updated": 8661385920077450000,
  "workspace": "Necessitatibus ipsum distinctio libero repellat."
}

Publish resource graph

put

Append one batch of the applied workspace resource graph for an inventory sync. The snapshot stays pending until a batch sets complete, which drops every other sync and makes this sync readable.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: olx
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: m
workspacestringRequired

Workspace identifier

Example: Quia accusantium.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 401
Body
completebooleanRequired

True on the last batch. Earlier batches leave the snapshot pending.

Example: false
sync_idstring · uuidRequired

Apply sync ID shared with resource inventory publication

Example: 6f2b5ac2-cc3e-421e-b782-75fd7fd15509
Responses
200

OK response.

application/json
edge_countinteger · int64Required

Edges stored for this sync, including earlier batches.

Example: 8065342656541048000
node_countinteger · int64Required

Resources in the inventory for this sync.

Example: 4786376777921368000
skipped_endpointsinteger · int64Required

Edges in this batch omitted because an endpoint was missing from this batch or from inventory.

Example: 4268252474274659000
put/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-graph
PUT /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-graph HTTP/1.1
Host: localhost:80
Harness-Account: 401
Content-Type: application/json
Accept: */*
Content-Length: 1183

{
  "complete": false,
  "edges": [
    {
      "attributes": [
        "Eos dolor qui quos accusantium possimus.",
        "Quis dolor et quia aut autem quia."
      ],
      "path_id": "Qui deleniti modi corrupti expedita vel.",
      "source": "Culpa et.",
      "target": "Placeat qui doloremque accusantium."
    },
    {
      "attributes": [
        "Eos dolor qui quos accusantium possimus.",
        "Quis dolor et quia aut autem quia."
      ],
      "path_id": "Qui deleniti modi corrupti expedita vel.",
      "source": "Culpa et.",
      "target": "Placeat qui doloremque accusantium."
    }
  ],
  "nodes": [
    {
      "address": "aws_vpc.main",
      "mode": "managed",
      "module": "Sapiente incidunt animi fuga.",
      "name": "Maiores ut et vel nihil.",
      "path_id": "Sint et est consequuntur veritatis ut.",
      "provider": "Et aspernatur.",
      "type": "Autem optio."
    },
    {
      "address": "aws_vpc.main",
      "mode": "managed",
      "module": "Sapiente incidunt animi fuga.",
      "name": "Maiores ut et vel nihil.",
      "path_id": "Sint et est consequuntur veritatis ut.",
      "provider": "Et aspernatur.",
      "type": "Autem optio."
    },
    {
      "address": "aws_vpc.main",
      "mode": "managed",
      "module": "Sapiente incidunt animi fuga.",
      "name": "Maiores ut et vel nihil.",
      "path_id": "Sint et est consequuntur veritatis ut.",
      "provider": "Et aspernatur.",
      "type": "Autem optio."
    }
  ],
  "sync_id": "4073a9ca-a932-4870-bafc-c115947c6c0f"
}
{
  "edge_count": 6199403380776726000,
  "node_count": 6476599334367775000,
  "skipped_endpoints": 9129693916683099000
}

List workspace resource types

get

Retrieves the resource types used by workspaces

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: rws
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: xx
workspacestringRequired

Workspace identifier

Example: Odio harum quas.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: kf
Responses
200

OK response.

application/json
string[]Optional

List of resource types

Example: ["Aspernatur minus qui.","Ad cum eum et aperiam quia eius."]
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types HTTP/1.1
Host: localhost:80
Harness-Account: kf
Accept: */*
[
  "Laudantium ipsa fuga laudantium deserunt.",
  "Ratione quos et est."
]

Map of resource types and their attributes

get

Retrieves the resource type attributes used by workspaces and attributes

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 89r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: x
workspacestringRequired

Workspace identifier

Example: Voluptatem ad deleniti ut adipisci.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: zy
Responses
200

OK response.

application/json

Map of resource types and their attributes

Other propertiesstring[]OptionalExample: ["Qui harum ex incidunt.","Laborum facere eaque in aspernatur officiis."]
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types-and-attributes
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types-and-attributes HTTP/1.1
Host: localhost:80
Harness-Account: zy
Accept: */*
{
  "Aut expedita voluptas quibusdam repellendus voluptas amet.": [
    "Eligendi aliquid est.",
    "Non unde nemo.",
    "Delectus consequatur.",
    "Qui est."
  ],
  "Neque nobis blanditiis.": [
    "Quia magnam sed quo placeat.",
    "Soluta culpa minima praesentium provident enim.",
    "Quos nisi cumque quia deserunt."
  ],
  "Unde voluptatem tempore quam aut rerum.": [
    "Totam qui.",
    "Inventore minima nulla est nihil tempora.",
    "Asperiores expedita neque in sed incidunt.",
    "Quos magnam velit adipisci asperiores nostrum sint."
  ]
}

List workspace resource type attributes

get

Retrieves the resource type attributes used by workspaces

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 9tk
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: ty
workspacestringRequired

Workspace identifier

Example: Totam dolores soluta.
resource_typestringRequired

Resource type

Example: Assumenda expedita iste.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: m
Responses
200

OK response.

application/json
string[]Optional

List of resource type attributes

Example: ["Est consequatur.","Quo dolores et iusto.","Vitae impedit repellendus.","Aperiam ut."]
get/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types/{resource_type}/attributes
GET /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resource-types/{resource_type}/attributes HTTP/1.1
Host: localhost:80
Harness-Account: m
Accept: */*
[
  "Soluta ad.",
  "Et et aut sint repellat quasi aut."
]

Delete resources

delete

Deletes destroyed resources for a workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: i
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: lz7
workspacestringRequired

Workspace identifier

Example: Nemo autem.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ip
Body
Responses
200

OK response.

application/json
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources HTTP/1.1
Host: localhost:80
Harness-Account: ip
Content-Type: application/json
Accept: */*
Content-Length: 523

{
  "resources": [
    {
      "module": "Placeat corrupti voluptatem aut qui perspiciatis quia.",
      "name": "Deserunt nemo ut ipsa.",
      "path_id": "Molestias laborum qui.",
      "provider": "Consequuntur culpa autem unde soluta quae ex.",
      "type": "Ea reprehenderit at molestiae sit cupiditate quas."
    },
    {
      "module": "Placeat corrupti voluptatem aut qui perspiciatis quia.",
      "name": "Deserunt nemo ut ipsa.",
      "path_id": "Molestias laborum qui.",
      "provider": "Consequuntur culpa autem unde soluta quae ex.",
      "type": "Ea reprehenderit at molestiae sit cupiditate quas."
    }
  ]
}
{
  "results": [
    {
      "error": "Eaque et ipsum cumque aut qui voluptatem.",
      "module": "Consequuntur ipsa ut.",
      "name": "Molestiae aut.",
      "provider": "Magni at consectetur nulla.",
      "status": "failed",
      "type": "Ut voluptatem natus dolorum aperiam dolore hic."
    },
    {
      "error": "Eaque et ipsum cumque aut qui voluptatem.",
      "module": "Consequuntur ipsa ut.",
      "name": "Molestiae aut.",
      "provider": "Magni at consectetur nulla.",
      "status": "failed",
      "type": "Ut voluptatem natus dolorum aperiam dolore hic."
    },
    {
      "error": "Eaque et ipsum cumque aut qui voluptatem.",
      "module": "Consequuntur ipsa ut.",
      "name": "Molestiae aut.",
      "provider": "Magni at consectetur nulla.",
      "status": "failed",
      "type": "Ut voluptatem natus dolorum aperiam dolore hic."
    }
  ],
  "summary": {
    "deleted": 1567968767474798800,
    "failed": 8128265166482946000,
    "skipped": 399536672396674400,
    "total": 6185119897353239000
  }
}

Update resources

patch

Updates resources for a workspace.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: fd
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: o
workspacestringRequired

Workspace identifier

Example: Non quod et et id quia et.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: xj
Body
session_idstring · uuidOptional

Session ID to track resource updates belongs to same operation

Example: 3bf3a053-c34a-4949-bc43-b69cf4d84f7e
update_modestring · enumOptional

Update mode: upsert (default) updates attributes; drift updates drift columns only

Default: upsertExample: driftPossible values:
Responses
200

OK response.

application/json
patch/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources
PATCH /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources HTTP/1.1
Host: localhost:80
Harness-Account: xj
Content-Type: application/json
Accept: */*
Content-Length: 1380

{
  "resources": [
    {
      "attributes": "Esse sint iusto numquam nulla officiis.",
      "drift_attributes": {
        "Quis possimus magni et.": "Dolorum quis voluptatum.",
        "Voluptatem et.": "Vitae alias nobis."
      },
      "drift_status": "deleted",
      "mode": "Asperiores asperiores consequatur.",
      "module": "Est numquam excepturi delectus vel autem.",
      "name": "Velit doloremque a ipsa enim ut.",
      "path_id": "Blanditiis in ipsum non ex odio.",
      "provider": "In ullam repellat est eligendi nobis.",
      "sensitive_attribute_paths": [
        "Et ea.",
        "Voluptas sequi dolore reiciendis qui est.",
        "Asperiores aut doloremque animi fugiat voluptas.",
        "Sed qui blanditiis."
      ],
      "type": "Quo et libero ipsum necessitatibus qui temporibus."
    },
    {
      "attributes": "Esse sint iusto numquam nulla officiis.",
      "drift_attributes": {
        "Quis possimus magni et.": "Dolorum quis voluptatum.",
        "Voluptatem et.": "Vitae alias nobis."
      },
      "drift_status": "deleted",
      "mode": "Asperiores asperiores consequatur.",
      "module": "Est numquam excepturi delectus vel autem.",
      "name": "Velit doloremque a ipsa enim ut.",
      "path_id": "Blanditiis in ipsum non ex odio.",
      "provider": "In ullam repellat est eligendi nobis.",
      "sensitive_attribute_paths": [
        "Et ea.",
        "Voluptas sequi dolore reiciendis qui est.",
        "Asperiores aut doloremque animi fugiat voluptas.",
        "Sed qui blanditiis."
      ],
      "type": "Quo et libero ipsum necessitatibus qui temporibus."
    }
  ],
  "session_id": "26a19ad2-31db-4cb7-afb8-a105109612e6",
  "update_mode": "upsert"
}
{
  "results": [
    {
      "error": "Consequatur corrupti atque illo ad ea.",
      "mode": "Cumque neque.",
      "module": "Reprehenderit sunt ipsam.",
      "name": "Quia et laudantium fugit.",
      "provider": "Ex laborum facilis molestiae aut esse.",
      "status": "skipped",
      "type": "A consequatur rerum non sit numquam."
    },
    {
      "error": "Consequatur corrupti atque illo ad ea.",
      "mode": "Cumque neque.",
      "module": "Reprehenderit sunt ipsam.",
      "name": "Quia et laudantium fugit.",
      "provider": "Ex laborum facilis molestiae aut esse.",
      "status": "skipped",
      "type": "A consequatur rerum non sit numquam."
    }
  ],
  "summary": {
    "failed": 8733448341162103000,
    "skipped": 7073563715756064000,
    "total": 1480454182789404400,
    "updated": 4456616226071622700
  }
}

Delete stale resources

delete

Deletes stale resources for a workspace that don't belong to the current session.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: fon
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: iem
workspacestringRequired

Workspace identifier

Example: Qui ad aperiam illum ea beatae et.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0o
Body
session_idstring · uuidRequired

Current session ID - resources not matching this will be deleted

Example: fea24e6f-0822-416d-9975-5f779600f451
Responses
200

OK response.

application/json
deleted_countinteger · int64Required

Number of stale resources deleted

Example: 1703700412303845600
delete/api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources/stale
DELETE /api/orgs/{org}/projects/{project}/workspaces/{workspace}/resources/stale HTTP/1.1
Host: localhost:80
Harness-Account: 0o
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "session_id": "427c3d84-0620-4c1e-a498-35ad45ea3717"
}
{
  "deleted_count": 2679989077083109400
}

Upload risk assessment data

post

Upload per-resource risk data and overall risk summary for an existing plan file.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: a
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: j0
workspacestringRequired

Workspace identifier

Example: workspace123
Query parameters
pipeline_idstringRequired

The unique identifier for the associated pipeline

Example: Sunt incidunt odit molestiae ut et.
stage_idstringRequired

The unique identifier for a stage

Example: Mollitia et eligendi quidem doloribus laudantium.
pipeline_execution_idstringRequired

The unique identifier for the associated pipeline execution

Example: Autem sit quidem est voluptatibus qui.
pipeline_stage_idstringRequired

The unique identifier for the associated pipeline execution stage

Example: Totam in vel et enim placeat deserunt.
provisioner_typestring · enumRequired

Type of provisioner that created the data

Example: tfPossible values:
data_typestring · enumRequired

Type of data stored

Example: cdk_driftPossible values:
stack_pathstringOptional

Optional path to the stack module

Example: At ut.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: u
Content-Lengthinteger · int64Optional

Size in bytes of the risk data.

Example: 87801351873059800
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
policy_evaluation_messagestringOptional

Pre-rendered message included when policy evaluation did not pass

Example: - instance type 'xlarge' is not permitted
policy_evaluation_statusstring · enumOptional

The overall status of policy evaluation (if it occurred) indicating whether it passed

Example: errorPossible values:
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/risk-assessment
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/risk-assessment?pipeline_id=Sunt+incidunt+odit+molestiae+ut+et.&stage_id=Mollitia+et+eligendi+quidem+doloribus+laudantium.&pipeline_execution_id=Autem+sit+quidem+est+voluptatibus+qui.&pipeline_stage_id=Totam+in+vel+et+enim+placeat+deserunt.&provisioner_type=tf&data_type=cdk_drift HTTP/1.1
Host: localhost:80
Harness-Account: u
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "policy_evaluation": [
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    },
    {
      "message": "Necessitatibus nulla neque totam consequatur.",
      "policy_id": "Voluptatem distinctio voluptatem quia dolorem voluptatibus.",
      "policy_name": "Nihil et incidunt.",
      "policy_set_id": "Id et quas perspiciatis iste.",
      "policy_set_name": "Quis ut est.",
      "policy_status": "Aperiam deleniti ut et impedit tempora consequatur."
    }
  ],
  "policy_evaluation_message": "- instance type 'xlarge' is not permitted",
  "policy_evaluation_status": "error"
}

Roll back workspace state to a previous version

post

Copies a historical state file to a new version and sets the workspace state pointer to it. Blocked when a pipeline execution is in flight.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: anx
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: y
workspacestringRequired

Workspace identifier

Example: Repellendus recusandae ut qui corporis.
data_idstring · uuidRequired

The unique identifier of the state version to roll back to

Example: 6bf6ac9b-b2a7-4b8e-8d73-c2fcebe5275e
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: b
Body
rollback_reasonstringOptional

Optional human-readable reason for the rollback

Example: Qui qui maiores eos accusamus maiores impedit.
Responses
200

OK response.

application/json
activity_idstring · uuidRequired

The unique identifier of the audit activity record

Example: a562a993-683c-4e8c-bbf2-8d33f7c47c43
new_data_idstring · uuidRequired

The unique identifier of the new state version created by the rollback

Example: 2dfe74bb-8584-4986-98f7-ae1cb1db63c2
new_file_versioninteger · int64Required

The file version timestamp (microseconds) of the new state object

Example: 6817473294927860000
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/state-versions/{data_id}/rollback
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/state-versions/{data_id}/rollback HTTP/1.1
Host: localhost:80
Harness-Account: b
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "rollback_reason": "Recusandae a veritatis optio assumenda laborum."
}
{
  "activity_id": "8465a669-7489-4d56-a41e-7a1cd71ac367",
  "new_data_id": "66bab1c3-1fa4-423a-adf3-9bca5b92631d",
  "new_file_version": 8495923036479045000
}

List provisioners ratio

get

Retrieves the ratio of provisioners used by workspaces

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: q1
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: d
Query parameters
start_timeinteger · int64Optional

Start time filter (Unix timestamp)

Example: 2871648614935167500
end_timeinteger · int64Optional

End time filter (Unix timestamp)

Example: 1037570023126539100
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: fj
Responses
200

OK response.

application/json

List of provisioners ratio

totalnumber · doubleRequired

Total number of workspaces

Example: 0.9650681509427244
get/api/orgs/{org}/projects/{project}/workspaces/provisioners-ratio
GET /api/orgs/{org}/projects/{project}/workspaces/provisioners-ratio HTTP/1.1
Host: localhost:80
Harness-Account: fj
Accept: */*
{
  "provisioner": {
    "Deserunt eum aspernatur corrupti cum aut ex.": 0.29940009196626455,
    "Earum voluptate.": 0.2357342323813719
  },
  "total": 0.7252221157967921
}

List workspaces associated with a template ID

get

Get all workspaces associated with a specific template ID

Path parameters
template_idstring · min: 1 · max: 128Required

Template identifier to filter workspaces

Example: j1q
Query parameters
orgstring · min: 1 · max: 128Optional

Organization identifier (required for 'org' and 'project' scope).

Example: zgf
projectstring · min: 1 · max: 128Optional

Project identifier (required for 'project' scope).

Example: m2f
versionstring · min: 1 · max: 32Optional

Template version associated with the workspace.

Example: 3
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account identifier.

Example: 0
Responses
200

OK response.

application/json

List of workspaces associated with the template ID

accountstring · min: 1 · max: 128Required

Account identifier.

Example: i
created_atinteger · int64Required

Timestamp when the workspace-template association was created.

Example: 1627590400
orgstring · min: 1 · max: 128Required

Organization identifier.

Example: o
projectstring · min: 1 · max: 128Required

Project identifier.

Example: 8
template_idstring · min: 1 · max: 128Required

Template identifier.

Example: au
updated_atinteger · int64Required

Timestamp when the workspace-template association was last updated.

Example: 1627686800
versionstring · min: 1 · max: 32Optional

Template version associated with the workspace.

Example: kzj
workspace_idstring · min: 1 · max: 128Required

Workspace identifier.

Example: w0
get/api/workspace/templates/{template_id}
GET /api/workspace/templates/{template_id} HTTP/1.1
Host: localhost:80
Harness-Account: 0
Accept: */*
[
  {
    "account": "nl",
    "created_at": 1627590400,
    "org": "00q",
    "project": "3i4",
    "template_id": "eb",
    "updated_at": 1627686800,
    "version": "d25",
    "workspace_id": "dg"
  },
  {
    "account": "nl",
    "created_at": 1627590400,
    "org": "00q",
    "project": "3i4",
    "template_id": "eb",
    "updated_at": 1627686800,
    "version": "d25",
    "workspace_id": "dg"
  },
  {
    "account": "nl",
    "created_at": 1627590400,
    "org": "00q",
    "project": "3i4",
    "template_id": "eb",
    "updated_at": 1627686800,
    "version": "d25",
    "workspace_id": "dg"
  }
]

List workspace template sync status

get

List the sync status of every workspace associated with a template version, paginated.

Path parameters
template_idstring · min: 1 · max: 128Required

Template identifier to filter workspaces

Example: skg
Query parameters
orgstring · min: 1 · max: 128Optional

Organization identifier (required for 'org' and 'project' scope).

Example: 6
projectstring · min: 1 · max: 128Optional

Project identifier (required for 'project' scope).

Example: 5w8
versionstring · min: 1 · max: 32Optional

Template version to compare workspaces against. Omitted/empty means the template service's stable version.

Example: pf
limitinteger · int64 · min: 1 · max: 100Optional

Rows per page.

Default: 10Example: 10
pageinteger · int64 · min: 1Optional

1-indexed page number to fetch. Ignored when 'status' is set; use 'page_token' instead.

Default: 1Example: 1
statusstring · enumOptional

Only return workspaces with this sync status. Pages are then continued with 'page_token' and a page may hold fewer than 'limit' entries.

Example: OUT_OF_SYNCPossible values:
page_tokenstring · min: 1 · max: 512Optional

The 'next_page_token' of the previous response. Only valid with 'status', and every filter parameter must match the request that produced the token.

Example: ef
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account identifier.

Example: f
Responses
200

OK response.

application/json
get/api/workspace/templates/{template_id}/sync-status
GET /api/workspace/templates/{template_id}/sync-status HTTP/1.1
Host: localhost:80
Harness-Account: f
Accept: */*
[
  {
    "entity": "p",
    "last_updated": 1627686800,
    "scope": {
      "org": "tbh",
      "project": "t"
    },
    "status": "SYNCED",
    "version": "4q"
  },
  {
    "entity": "p",
    "last_updated": 1627686800,
    "scope": {
      "org": "tbh",
      "project": "t"
    },
    "status": "SYNCED",
    "version": "4q"
  },
  {
    "entity": "p",
    "last_updated": 1627686800,
    "scope": {
      "org": "tbh",
      "project": "t"
    },
    "status": "SYNCED",
    "version": "4q"
  },
  {
    "entity": "p",
    "last_updated": 1627686800,
    "scope": {
      "org": "tbh",
      "project": "t"
    },
    "status": "SYNCED",
    "version": "4q"
  }
]

Last updated

Was this helpful?