Skip to content

Harness NextGen Software Delivery Platform API Reference (1.0)

The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes.

Introduction

The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster.

For more information about how Harness works, read our documentation or visit the Harness Developer Hub.

How it works

The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to Authentication.

Get started

Before you start integrating, get to know our API better by reading the following topics:

The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need.

Authentication

To authenticate with the Harness API, you need to:

  1. Generate an API token on the Harness Platform.
  2. Send the API token you generate in the x-api-key header in each request.

Generate an API token

To generate an API token, complete the following steps:

  1. Go to the Harness Platform.
  2. On the left-hand navigation, click My Profile.
  3. Click +API Key, enter a name for your key and then click Save.
  4. Within the API Key tile, click +Token.
  5. Enter a name for your token and click Generate Token. Important: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page.

Send the API token in your requests

Send the token you created in the Harness Platform in the x-api-key header. For example: x-api-key: YOUR_API_KEY_HERE

Requests and Responses

The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples.

Common Parameters [Beta]

Field NameTypeDefaultDescription
identifierstringnoneURL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope.
namestringnoneHuman-friendly name for the resource.
orgstringnoneLimit to provided org identifiers.
projectstringnoneLimit to provided project identifiers.
descriptionstringnoneMore information about the specific resource.
tagsmap[string]stringnoneList of labels applied to the resource.
orderstringdescOrder to use when sorting the specified fields. Type: enum(asc,desc).
sortstringnoneFields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields.
limitint30Pagination: Number of items to return.
pageint1Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page.
createdint64noneUnix timestamp that shows when the resource was created (in milliseconds).
updatedint64noneUnix timestamp that shows when the resource was last edited (in milliseconds).

Status Codes

Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server.

Error CodeDescription
200OK
201Created
202Accepted
204No Content
400Bad Request
401Unauthorized
403Forbidden
412Precondition Failed
415Unsupported Media Type
500Server Error

To view our error response structures, go here.

Versioning [Beta]

Harness Version

The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs.

Generation

All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with app.harness.io/v1/, where v1 is the API Generation.

The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources.

Pagination [Beta]

We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100.

Following are the pagination headers supported in the response bodies of paginated APIs:

  1. X-Total-Elements : Indicates the total number of entries in a paginated response.
  2. X-Page-Number : Indicates the page number currently returned for a paginated response.
  3. X-Page-Size : Indicates the number of entries per page for a paginated response.

For example:

X-Total-Elements : 30
X-Page-Number : 0
X-Page-Size : 10
Download OpenAPI description
Languages
Servers
Harness host URL
https://app.harness.io
Vanity URL
https://{vanity}

Organization

Create and manage organizations in your account. You use organizations to group together related projects. For example, you can use an organization to group together projects within a business unit or division.

Operations

Project [Beta]

This contains APIs for projects.

Operations

Project

This contains APIs related to Project as defined in Harness

Operations

Account Secrets [Beta]

This contains APIs for account-scoped secrets.

Operations

Organization Secrets [Beta]

This contains APIs for organization-scoped secrets.

Operations

Project Secrets [Beta]

This contains APIs for project-scoped secrets.

Operations

Secrets

This contains APIs related to Secrets as defined in Harness

Operations

Account Connectors [Beta]

This contains APIs for Account-scoped Connectors.

Operations

Organization Connectors [Beta]

This contains APIs for Organization-scoped Connectors.

Operations

Project Connectors [Beta]

This contains APIs for Project-scoped Connectors.

Operations

Connectors

This contains APIs related to Connectors as defined in Harness

Operations

GoogleSecretManagerConnector

This contains APIs specific to Google Secret Manager Connector as defined in Harness

Operations

Account Roles [Beta]

This contains APIs for Account-scoped Roles.

Operations

Organization Roles [Beta]

This contains APIs for Organization-scoped Roles.

Operations

Project Roles [Beta]

This contains APIs for Project-scoped Roles.

Operations

Roles

This contains APIs for CRUD on roles

Operations

Account Resource Groups [Beta]

This contains APIs for Account-scoped Resource Groups.

Operations

Organization Resource Groups [Beta]

This contains APIs for Organization-scoped Resource Groups.

Operations

Project Resource Groups [Beta]

This contains APIs for Project-scoped Resource Groups.

Operations

Filter Resource Groups [Beta]

This contains the filter endpoint for Resource Groups.

Operations

Harness Resource Group

This contains APIs specific to the Harness Resource Group

Operations

Zendesk

This contains APIs specific to the creation of zendesk ticket

Operations

Account Role Assignments [Beta]

This contains APIs for Account-scoped Role Assignments.

Operations

Organization Role Assignments [Beta]

This contains APIs for Organization-scoped Role Assignments.

Operations

Project Role Assignments [Beta]

This contains APIs for Project-scoped Role Assignments.

Operations

Role Assignments

This contains APIs for CRUD on role assignments

Operations

Access Control List

This contains the APIs to perform access control checks

Operations

Account Banner

This contains APIs for Account Banners.

Operations

Account Banner

This contains APIs for Account Banners.

Operations

Account Licensed Modules

This contains APIs for Account Licensed Modules.

Operations

Account License Type

Operations

Account Webhooks

This contains APIs for Account Webhooks.

Operations

AccountSetting

This contains APIs related to Account Settings as defined in Harness

Operations

Accounts

This contains APIs related to accounts as defined in Harness

Operations

Analyze Account Access Policy

Operations

Analyze Organization Access Policy

Operations

Analyze Project Access Policy

Operations

ApiKey

This fetches API keys defined in Harness

Operations

Audit

This contains APIs related to Audit as defined in Harness

Operations

AuditFilters

This contains APIs related to Filter of type Audit as defined in Harness

Operations

Authentication Settings

This contains APIs related to Authentication settings as defined in Harness

Operations

Canny

This contains APIs required for the creation of Canny tickets

Operations

Devops Essentials License Data By Account

Operations

EULA [Beta]

This contains APIs for EULA.

Operations

Filter

This contains APIs related to Filter as defined in Harness

Operations

Harness Resource Type

This contains APIs related to Harness Resource Type

Operations

Invite

This contains APIs related to Invite as defined in Harness

Operations

IP Allowlist [Beta]

This contains APIs for IP Allowlist.

Operations

Nextgen Ldap

This contains APIs related to Nextgen Ldap as defined in Harness

Operations

Notification Channels

This contains APIs for Notification Channels

Operations

Notification Rules

This contains APIs for Notification Rules

Operations

OIDC

This contains APIs related to the Harness OIDC config

Operations

Oidc-Access-Token

This contains APIs related to OIDC Access Token generation as defined in Harness

Operations

Oidc-ID-Token

This contains APIs related to OIDC ID Token generation as defined in Harness

Operations

Org Webhooks

This contains APIs for Org Webhooks.

Operations

Permissions

This contains the APIs related to permissions

Operations

Project Webhooks

This contains APIs for Project Webhooks.

Operations

Secret Managers

This contains APIs related to SecretManagers as defined in Harness

Operations

Service Account

This has all the APIs specific to the Service Accounts in Harness.

Operations

Setting

This contains APIs related to Settings as defined in Harness

Operations

SMTP

This contains APIs related to SmtpConfig as defined in Harness

Operations

Source Code Manager

Contains APIs related to Source Code Manager

Operations

Token

This contains APIs related to Token as defined in Harness

Operations

User

This contains APIs related to User as defined in Harness

Operations

User Group

This contains APIs related to User Group as defined in Harness

Operations

Variables

This contains APIs related to Variables as defined in Harness.

Operations

Agent mTLS Endpoint Management

Contains APIs related to Agent mTLS Endpoint management.

Operations

Delegate Download Resource

Contains APIs related to Downloading Delegates

Operations

Delegate Group Tags Resource

Contains APIs related to Delegate Group Tags management

Operations

Delegate Setup Resource

Contains Delegate Setup APIs

Operations

Delegate Token Resource

Contains APIs related to Delegate Token management

Operations

Pipelines [Beta]

This contains APIs for performing CRUD operations on Pipelines.

Operations

Input Sets [Beta]

This contains APIs for Input Sets.

Operations

Approvals

This contains APIs for Approvals.

Operations

Pipeline Execution [Beta]

This contains APIs for Pipeline Execution.

Operations

Pipeline Dashboard

This contains APIs related to Pipeline Dashboard

Operations

Pipeline Input Set

This contains APIs related to Input Sets

Operations

Pipeline

This contains pipeline APIs for files as provided as runtime input during pipeline execution

Operations

Pipeline Execution Details

This contains APIs for fetching Pipeline Execution Details

Operations

Pipeline Execute

This contains APIs for Executing a Pipeline

Operations

Pipeline Refresh

This contains APIs related to validation of templates in pipeline yaml

Operations

Pipeline data retention

This contains APIs related to retention of pipeline execution data

Operations

Triggers [Beta]

This contains APIs for performing CRUD operations on Triggers.

Operations

TriggersEvents

This contains APIs related to Trigger Event History.

Operations

Webhook Triggers

This contains APIs related to Webhook Triggers.

Operations

Webhook Event Handler

Contains APIs corresponding to Webhook Triggers.

Operations

Registries

APIs to create, update, list registries

Operations

Artifacts

APIs to get, list artifacts

Operations

Docker Artifacts

APIs to get details of docker artifacts

Operations

Helm Artifacts

APIs to get details of helm artifacts

Operations

quarantine

Operations

Webhooks

APIs to create, update, list webhooks

Operations

Spaces

Operations

Replication

Operations

Registry V3 - Registries

V3 registries endpoints

Operations

Registry V3 - Packages

V3 packages endpoints

Operations

Registry V3 - Versions

V3 versions endpoints

Operations

Registry V3 - Files

V3 files endpoints

Operations

Registry V3 - Metadata

V3 metadata endpoints

Operations

Registry V3 - Firewall

V3 firewall endpoints

Operations

Registry V3 - Transfer

V3 transfer endpoints

Operations

Database Schema

This contains APIs for performing CRUD operations on Database Schema Entity

Operations

Database Instance

This contains APIs for performing CRUD operations on Database Instance Entity

Operations

Deployed State

This contains APIs for tracking changeSet deployment status

Operations

Execution Config

This contains APIs for execution config for image tags

Operations

Migration State

This contains APIs for getting Migration State of Database Schema Entity

Operations

K8s Release Service Mapping [Beta]

This contains APIs for Fetching Release details regarding a pod.

Operations

CustomDeployment

This contains APIs related to Custom Deployment

Operations

Environments

This contains APIs related to Environments

Operations

EnvironmentGroup

This contains APIs related to EnvironmentGroup.

Operations

Infrastructures

This contains APIs related to Infrastructure Definitions

Operations

Usage

This contains APIs specific to CD license usage

Operations

File Store

This contains APIs related to File Store in Harness

Operations

Service Dashboard

This contains APIs related to Service Dashboard

Operations

ServiceOverrides

This contains APIs related to Service Overrides V2

Operations

Rollback

This contains APIs related to Post Prod Rollback of specific service

Operations

tas

This contains APIs related to tas

Operations

Freeze CRUD

This contains APIs related to Freeze CRUD

Operations

Freeze Evaluation

This contains APIs related to evaluation Freeze status

Freeze Schema

This contains APIs related to construct schema for Freeze

Account Services [Beta]

This contains APIs for account-scoped services.

Operations

Organization Services [Beta]

This contains APIs for organization-scoped services.

Operations

Project Services [Beta]

This contains APIs for project-scoped services.

Operations

Services

This contains APIs related to Services

Operations

Account Rancher Infrastructure [Beta]

This contains APIs for Rancher infra entities for account level.

Operations

Org Rancher Infrastructure [Beta]

This contains APIs for Rancher infra entities for org level.

Operations

Project Rancher Infrastructure [Beta]

This contains APIs for Rancher infra entities for project level.

Operations

Account Templates [Beta]

This contains APIs for Account-scoped Templates.

Operations

Organization Templates [Beta]

This contains APIs for Organization-scoped Templates.

Operations

Project Templates [Beta]

This contains APIs for Project-scoped Templates.

Operations

Templates

This contains a list of APIs specific to the Templates Validations and Refresh

Operations

Global Templates

This contains a list of APIs specific to the Global Templates

Agents

Operations

Application

Operations

Applications

Operations

Certificates

Operations

Clusters

This contains APIs related to Gitops Clusters

Operations

Dashboard Aggregates

Operations

Dashboards

Operations

GnuPGP Keys

Operations

GPG Keys

Operations

Hosts

This contains APIs related to Hosts as defined in Harness

Operations

Project mappings

Operations

Projects

Operations

Reconciler

Operations

Repositories

Operations

Repository Certificates

Operations

Repository credentials

Operations

ValidateHost

This contains APIs related to SSH or WinRm host validation

Operations

Account GitX Webhooks

This contains APIs for Account GitX Webhooks.

Operations

Org Gitx Webhooks

Operations

Project Gitx Webhooks

Operations

Anomalies Ignorelist Rule

This contains APIs related to Anomalies Ignorelist Rule Management.

Operations

Anomalies

Get details about any anomalous spike in your cloud and AI costs

Operations

BI Dashboards

Get details of BI-dashboards specific to CACM

Operations

Budgets

Manage Budgets in bulk

Operations

Budget Groups

Manage Budget Groups and receive alerts when your costs exceed (or are forecasted to exceed) your configured budget group.

Operations

Cost Categories

Allows you to categorize based on business requirements and get a contextual view of your expenses.

Operations

Cloud Accounts

APIs for listing cloud accounts across cloud providers.

Operations

K8S Connectors Metadata

Health related metadata for your k8S clusters having cost access enabled.

Operations

Notification Settings v2

Set notification channels to get cloud and AI cost anomaly alerts

Operations

Overview

Get overview of CACM features.

Operations

Data Job Status

Track and monitor the status of data ingestion and processing jobs across your cloud cost data pipeline.

Operations

Recommendation cost settings

Get/set cost type preferences for recommendations

Operations

Unit Metric

Unit Metric resource.

Operations

Anomaly Comments

APIs to manage anomaly comments

Operations

Cloud and AI cost anomaly details

Get resource level insights into your cloud and AI cost anomalies

Operations

Cloud and AI cost anomalies v2

Get details about any anomalies in your cloud and AI costs

Operations

Cost Details

Fetch cloud and AI cost data for cost analysis

Operations

Currency Preferences

Select destination currency to view different cloud provider currencies in destination currency

External Data Provider

This contains APIs related to External Data Provider Support for CACM

Operations

AiEngine

This contains APIs related to Generative AI Support for Governance

Operations

CACM governance cost settings

Get/set cost type settings for CACM governance

Operations

Governance Enforcement Recommendation APIs

This contains APIs related to CACM Governance Enforcement Recommendations

Operations

Governance Alert

This contains APIs related to Governance Alert Management

Operations

Governance Overview

This contains APIs related to CACM Governance Overview Page

Operations

Governance Recommendation APIs

This contains APIs related to CACM Governance Recommendations

Operations

RuleEnforcement

This contains APIs related to Rule Enforcement

Operations

Rule Executions

This contains APIs related to Rule Executions

Operations

Rule

This contains APIs related to Governance Rule Management

Operations

Rule Sets

Rule sets serve as logical bindings on top of individual rules that help you organize and manage rules.

Operations

Perspectives Folders

Group your Perspectives using Folders in ways that are more meaningful to your business needs.

Operations

Perspective Reports

Manage cost reports created on Perspectives.

Operations

Perspectives

Group your resources using Perspectives in ways that are more meaningful to your business needs.

Operations

Cost Category Jira Project Mapping

Cost Category Jira Project Mapping CRUD APIs.

Operations

Recommendations Details

Recommendations details for workloads and node pools.

Operations

Recommendations

Recommendations for workloads and node pools.

Operations

Recommendation Jira

Recommendation CRUD apis for jira.

Operations

Recommendation Preferences

Recommendation apis for recommendations preferences.

Operations

Recommendation Presets

Recommendation apis for recommendations presets.

Operations

Recommendation Servicenow

Recommendation CRUD apis for servicenow.

Operations

Recommendation Tags

Recommendation apis for recommendations tags.

Operations

Recommendation Ignore List

Recommendation CRUD apis for recommendations ignore list.

Operations

AutoStopping Rules

This contains APIs to create and manage AutoStopping Rules for your cloud resources.

Operations

AutoStopping Rules V2

This contains Autostopping v2 APIs that support the usage of Autostopping Proxy for managing cloud resources.

Operations

AutoStopping Load Balancers

This contains APIs to create and manage load balancers used for AutoStopping.

Operations

AutoStopping Fixed Schedules

This contains APIs to manage fixed schedules for the AutoStopping Rules.

Operations

AutoStopping Alerts

This contains APIs to create and manage alerts for AutoStopping events and notifications.

Operations

Commitment Orchestrator Events APIs

This contains APIs to fetch commitment orchestrator events data.

Operations

API Keys

APIs to create and manage Feature Flag SDK API Keys

Operations

Feature Flags

APIs to create and manage Feature Flags

Operations

Targets

APIs to create and manage Feature Flag Targets

Operations

Target Groups

APIs to create and manage Feature Flag Target Groups

Operations

Environment Perspectives

APIs to create and manage Feature Flag Environment perspectives

Operations

Anomalies

Get details about any anomalous spike in your cloud and AI costs

Operations

Proxy

APIs used by the ff-proxy

Operations

Tags

APIs to create and manage Feature Flag Tags

Operations

Monitored Services

This contains APIs related to CRUD operations of Monitored Services

Operations

SLOs dashboard

This contains APIs related to SLOs dashboard

Operations

NG SLOs

This contains APIs related to CRUD operations of SLOs (simple & composite)

Operations

SLOs

This contains APIs related to CRUD operations of SLOs

Operations

Downtime

This contains APIs related to CRUD operations of Downtime

Operations

Srm Notification

This contains APIs related to CRUD operations of srm notifications

Operations

Entities

APIs for managing catalog Entities which represent the core components of your system. Entities can represent services, APIs, user groups, resources, and more. These endpoints allow you to create, retrieve, update, delete, and query entities across different scopes.

Operations

Catalog Custom Properties

Catalog Custom Properties

Operations

Scores Information

Scores Information

Operations

DataSource Information

DataSource Information

Operations

Kubernetes DataPoints Information

Kubernetes DataPoints Information

Operations

IDP App Configurations

IDP App Configurations

Operations

Plugin Information

Plugin Information

Operations

Layout Proxy

Layout Proxy

Operations

Kinds

This contains APIs for Kinds.

Operations

LayoutsV3

This contains APIs for LayoutsV3.

Operations

LayoutsV4

This contains APIs for LayoutsV4.

Operations

Environment

The environment service for working with Environment-type infrastructures

Operations

Infrastructure

The infrastructure service for working with infrastructures

Operations

Instance

The instance service for working with instances

Operations

aida

AIDA API's for Harness OPA

Operations

dashboards

Operations

downloads

Operations

folders

Operations

dashboard

Aggregate summary of policies, policy sets and evaluations for display on the dashboard

Operations

examples

Example rego policies and corresponding input

Operations

policies

Create, edit and delete Governance policies written in rego

Operations

evaluate

Perform evaluations

Operations

evaluations

Access evaluation results

Operations

policysets

Create, edit and delete Governance policy sets

Operations

system

System version and health

Operations

repository

Operations

status_checks

Operations

pullreq

Operations

upload

Operations

webhook

Operations

resource

Operations

rules

Operations

labels

Operations

usage

Usage service handles licencing

Operations

approvals

Approval service handles the approval API to approve or reject pipeline executions

Operations

costs

Costs Service handles the API related with the costs attached to workspaces. This API is read only as all the cost are generated in the plugin side

Operations

executions

Executions Service handles the API for workflow executions.

At this time it is a read-only API with no ability to directly create or edit executions. Instead these are triggered from the Workspaces Service.

Operations

module-registry

The module-registry service is a private registry for Terraform/Opentofu modules

Operations

workspaces

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

Operations

Show workspace metrics

Request

Show metrics for workspaces

Security
x-api-key
Path
orgstring[ 1 .. 128 ] charactersrequired

Org is the organisation identifier.

Example: 2
projectstring[ 1 .. 128 ] charactersrequired

Project is the project identifier.

Example: a
Query
start_timeinteger(int64)

Start time filter (Unix timestamp)

Example: start_time=4988982404882760000
end_timeinteger(int64)

End time filter (Unix timestamp)

Example: end_time=6586438679627230000
Headers
Harness-Accountstring[ 1 .. 128 ] charactersrequired

Account is the internal customer account ID.

Example: 2v1
curl -i -X GET \
  'https://app.harness.io/iacm/api/orgs/2/projects/a/workspace-metrics?start_time=4988982404882760000&end_time=6586438679627230000' \
  -H 'Harness-Account: 2v1' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

OK response.

Bodyapplication/json
status_countsobject

Counts by status

Example: {"Voluptates quia et natus distinctio error.":8996449463175090000}
Response
application/json
{ "status_counts": { "Quo et libero ipsum necessitatibus qui temporibus.": 4752835921268047000 } }

List workspaces

Request

List all workspaces.

Security
x-api-key
Path
orgstring[ 1 .. 128 ] charactersrequired

Org is the organisation identifier.

Example: bc
projectstring[ 1 .. 128 ] charactersrequired

Project is the project identifier.

Example: 3n
Query
limitinteger(int64)[ 1 .. 1000 ]

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

Default 30
Example: limit=30
pageinteger(int64)>= 1

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

Default 1
Example: page=1
searchTermstring

Filter results by partial name match

Default ""
Example: searchTerm=mysta
sortstring

Sort order for results

Default "name,ASC"
Enum"name,ASC""name,DESC""updated,ASC""updated,DESC"
Example: sort=name,ASC
statusArray of strings

Status of the execution

Example: status=Inventore iusto temporibus et dolorum non in.&status=Omnis voluptas atque aut qui.&status=Deserunt asperiores dolores reiciendis facilis.&status=Voluptatem dolore totam.
tagsArray of strings

Comma separated list of tags to filter by

Example: tags=Mollitia maxime et doloribus.&tags=Sunt et quis voluptatem vel natus non.
Headers
Harness-Accountstring[ 1 .. 128 ] charactersrequired

Account is the internal customer account ID.

Example: 3j1
curl -i -X GET \
  'https://app.harness.io/iacm/api/orgs/bc/projects/3n/workspaces?limit=30&page=1&searchTerm=mysta&sort=name%2CASC&status=Inventore+iusto+temporibus+et+dolorum+non+in.%2COmnis+voluptas+atque+aut+qui.%2CDeserunt+asperiores+dolores+reiciendis+facilis.%2CVoluptatem+dolore+totam.&tags=Mollitia+maxime+et+doloribus.%2CSunt+et+quis+voluptatem+vel+natus+non.' \
  -H 'Harness-Account: 3j1' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

OK response.

Headers
x-page-sizeinteger(int64)

Current page size

Example: 50
x-total-itemsinteger(int64)

Total items available

Example: 1800
x-total-pagesinteger(int64)

Total pages available

Example: 36
Bodyapplication/jsonArray [
accountstring[ 1 .. 128 ] charactersrequired

Account is the internal customer account ID.

Example: "94o"
createdinteger(int64)required

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

Example: 99828838502601250
descriptionstring

Description provides long-form text about the resource.

Example: "this is a more detailed explanation of the resource."
identifierstring[ 1 .. 128 ] charactersrequired

Workspace identifier.

Example: "pvb"
namestring[ 1 .. 128 ] charactersrequired

Name is the human readable name for the resource.

Example: "resource name"
orgstring[ 1 .. 128 ] charactersrequired

Org is the organisation identifier.

Example: "j"
projectstring[ 1 .. 128 ] charactersrequired

Project is the project identifier.

Example: "lu"
statusstringrequired

The status of the workspace

Enum"active""inactive""provisioning""destroying""failed""unknown"
Example: "provisioning"
updatedinteger(int64)required

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

Example: 5109510937432219000
]
Response
application/json
[ { "account": "np", "created": 6753526141080875000, "description": "this is a more detailed explanation of the resource.", "identifier": "4", "name": "resource name", "org": "9", "project": "o", "status": "provisioning", "updated": 1329986957418801700 }, { "account": "np", "created": 6753526141080875000, "description": "this is a more detailed explanation of the resource.", "identifier": "4", "name": "resource name", "org": "9", "project": "o", "status": "provisioning", "updated": 1329986957418801700 }, { "account": "np", "created": 6753526141080875000, "description": "this is a more detailed explanation of the resource.", "identifier": "4", "name": "resource name", "org": "9", "project": "o", "status": "provisioning", "updated": 1329986957418801700 } ]

Create workspace

Request

Create a new workspace.

Security
x-api-key
Path
orgstring[ 1 .. 128 ] charactersrequired

Org is the organisation identifier.

Example: o9
projectstring[ 1 .. 128 ] charactersrequired

Project is the project identifier.

Example: g
Headers
Harness-Accountstring[ 1 .. 128 ] charactersrequired

Account is the internal customer account ID.

Example: jp0
Bodyapplication/jsonrequired
associated_templateobject(AssociatedTemplate)

AssociatedTemplate defines the template details with template_id and version.

Example: {"template_id":"s1","version":"ck"}
budgetnumber(float)

define the budget for a specific workspace

Example: 0.5332152
cost_breakdown_jsonstring

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

Example: "c4a2d99bc28d236098a095277b7eb0718d6be068"
cost_diff_jsonstring

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

Example: "c4a2d99bc28d236098a095277b7eb0718d6be068"
cost_estimation_enabledboolean

define if cost estimation operations will be performed in this workspace

Default false
Example: true
default_pipelinesobject

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

Example: {"Non et est.":{"project_pipeline":"Accusamus aut.","workspace_pipeline":"Id dolor laudantium omnis."},"Vel labore fugiat modi.":{"project_pipeline":"Accusamus aut.","workspace_pipeline":"Id dolor laudantium omnis."}}
descriptionstring

Description provides long-form text about the resource.

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

list of environment variables configured on the workspace.

Example: {"Distinctio voluptatum est eius.":{"key":"f9","value":"Quo voluptas laboriosam asperiores.","value_type":"string"},"Ipsum et quis aut.":{"key":"f9","value":"Quo voluptas laboriosam asperiores.","value_type":"string"}}
environment_variables.​property name*object(IaCMVariable)additional property

Variable is the representation for a single variable associated with a workspace.

Example: {"key":"v","value":"Quas quis rerum.","value_type":"secret"}
idinteger(int64)

ID PK for internal uses

Example: 7725359629445506000
identifierstring[ 1 .. 128 ] charactersrequired

Workspace identifier.

Example: "4e6"
modules_jsonstring

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

Example: "c4a2d99bc28d236098a095277b7eb0718d6be068"
namestring[ 1 .. 128 ] charactersrequired

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: "Et et."
provider_connectorsArray of objects(WorkspaceProviderConnector)

define an array of provider connectors that belong to Workspace

Example: [{"connector_ref":"tm","created":1627590400,"id":5383730240656092000,"terragrunt_provider":false,"type":"azure","updated":1627686800,"workspace_id":1025464643727282800},{"connector_ref":"tm","created":1627590400,"id":5383730240656092000,"terragrunt_provider":false,"type":"azure","updated":1627686800,"workspace_id":1025464643727282800}]
providers_jsonstring

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

Example: "c4a2d99bc28d236098a095277b7eb0718d6be068"
provisionerstringrequired

Provisioner defines the provisioning tool to use.

Example: "Maiores aspernatur praesentium distinctio consequatur."
provisioner_configurationstring

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

Example: "Tempore voluptatum veritatis."
provisioner_versionstring

Provisioner Version defines the tool version to use.

Default "latest"
Example: "Voluptate tempora quasi ut."
prune_sensitive_databoolean

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

Default false
Example: true
repositorystring

Repository is the name of the repository to use.

Example: "Et sequi suscipit ratione natus quis."
repository_branchstring

Repository Branch in which the code should be accessed.

Example: "main"
repository_commitstring

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

Example: "abc10ed"
repository_connectorstring

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

Example: "Exercitationem accusantium."
repository_pathstring

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

Default ""
Example: ""
repository_shastring

Repository SHA in which the code should be accessed.

Example: "abc10ed"
repository_submodulesstring

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

Default "false"
Enum"false""true""recursive"
Example: "recursive"
run_allboolean

Run-All terragrunt modules.

Example: true
sparse_checkoutstring

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

Example: "Alias aliquid minima facere ex commodi."
state_checksumstring

state_checksum is the sha-256 checksum of terraform state file

Example: "d21c1662d8ce2c74f24efdc8db93eb34473b86810aeccca4b1518f70b0ccde8f"
tagsobject

Tags associated with the workspace.

Example: {"cost-center":"engineering","environment":"production","team":"platform"}
terraform_plan_jsonstring

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

Example: "f9e21473daaa2674d862b67a1339f4570e86de17"
terraform_statestring

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

Example: "fc1200c7a7aa52109d762a9f005b149abef01479"
terraform_state_jsonstring

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

Example: "c4a2d99bc28d236098a095277b7eb0718d6be068"
terraform_variable_filesArray of objects(WorkspaceTerraformVariableFiles)

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

Example: [{"repository":"Quis at et accusamus.","repository_branch":"main","repository_commit":"abc10ed","repository_connector":"Et veniam asperiores qui explicabo iure et.","repository_path":"","repository_sha":"abc10ed"},{"repository":"Quis at et accusamus.","repository_branch":"main","repository_commit":"abc10ed","repository_connector":"Et veniam asperiores qui explicabo iure et.","repository_path":"","repository_sha":"abc10ed"},{"repository":"Quis at et accusamus.","repository_branch":"main","repository_commit":"abc10ed","repository_connector":"Et veniam asperiores qui explicabo iure et.","repository_path":"","repository_sha":"abc10ed"},{"repository":"Quis at et accusamus.","repository_branch":"main","repository_commit":"abc10ed","repository_connector":"Et veniam asperiores qui explicabo iure et.","repository_path":"","repository_sha":"abc10ed"}]
terraform_variablesobjectrequired

list of terraform variables configured on the workspace.

Example: {"Id reprehenderit nostrum eveniet eveniet.":{"key":"f9","value":"Quo voluptas laboriosam asperiores.","value_type":"string"},"Soluta quos inventore aut.":{"key":"f9","value":"Quo voluptas laboriosam asperiores.","value_type":"string"}}
terraform_variables.​property name*object(IaCMVariable)additional property

Variable is the representation for a single variable associated with a workspace.

Example: {"key":"v","value":"Quas quis rerum.","value_type":"secret"}
terragrunt_providerboolean

Whether this workspace uses terragrunt to provision infrastructure

Default false
Example: true
terragrunt_versionstring

Terragrunt Version to use when provisioner is terragrunt.

Example: "Mollitia quos numquam quas."
variable_setsArray of strings

Attached Variable Sets references

Example: ["Ducimus vero impedit qui unde.","Sapiente qui repellendus sit rem eos."]
curl -i -X POST \
  https://app.harness.io/iacm/api/orgs/o9/projects/g/workspaces \
  -H 'Content-Type: application/json' \
  -H 'Harness-Account: jp0' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "associated_template": {
      "template_id": "7",
      "version": "6"
    },
    "budget": 0.7937008,
    "cost_breakdown_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
    "cost_diff_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
    "cost_estimation_enabled": true,
    "default_pipelines": {
      "Aliquam iste sapiente fuga velit.": {
        "project_pipeline": "Accusamus aut.",
        "workspace_pipeline": "Id dolor laudantium omnis."
      }
    },
    "description": "this is a more detailed explanation of the resource.",
    "environment_variables": {
      "Consequatur repellat commodi qui perspiciatis excepturi quia.": {
        "key": "f9",
        "value": "Quo voluptas laboriosam asperiores.",
        "value_type": "string"
      }
    },
    "id": 7821711501694201000,
    "identifier": "lf",
    "modules_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
    "name": "resource name",
    "provider_connector": "Amet id dicta omnis expedita quae.",
    "provider_connectors": [
      {
        "connector_ref": "tm",
        "created": 1627590400,
        "id": 5383730240656092000,
        "terragrunt_provider": false,
        "type": "azure",
        "updated": 1627686800,
        "workspace_id": 1025464643727282800
      },
      {
        "connector_ref": "tm",
        "created": 1627590400,
        "id": 5383730240656092000,
        "terragrunt_provider": false,
        "type": "azure",
        "updated": 1627686800,
        "workspace_id": 1025464643727282800
      }
    ],
    "providers_json": "c4a2d99bc28d236098a095277b7eb0718d6be068",
    "provisioner": "Veniam consequatur et facere.",
    "provisioner_configuration": "At quia harum exercitationem non.",
    "provisioner_version": "Laboriosam iure excepturi quam.",
    "prune_sensitive_data": true,
    "repository": "Ut et id optio voluptatem quasi.",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "Sint hic sit libero ea maiores aut.",
    "repository_path": "",
    "repository_sha": "abc10ed",
    "repository_submodules": "recursive",
    "run_all": true,
    "sparse_checkout": "Autem numquam incidunt nesciunt quas.",
    "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": [
      {
        "repository": "Quis at et accusamus.",
        "repository_branch": "main",
        "repository_commit": "abc10ed",
        "repository_connector": "Et veniam asperiores qui explicabo iure et.",
        "repository_path": "",
        "repository_sha": "abc10ed"
      },
      {
        "repository": "Quis at et accusamus.",
        "repository_branch": "main",
        "repository_commit": "abc10ed",
        "repository_connector": "Et veniam asperiores qui explicabo iure et.",
        "repository_path": "",
        "repository_sha": "abc10ed"
      }
    ],
    "terraform_variables": {
      "Debitis alias incidunt architecto fugiat nemo.": {
        "key": "f9",
        "value": "Quo voluptas laboriosam asperiores.",
        "value_type": "string"
      },
      "Nesciunt ut eos ut iste.": {
        "key": "f9",
        "value": "Quo voluptas laboriosam asperiores.",
        "value_type": "string"
      }
    },
    "terragrunt_provider": false,
    "terragrunt_version": "Dolorum velit et porro.",
    "variable_sets": [
      "Ex ab adipisci.",
      "Corrupti dicta ad illo cupiditate accusantium."
    ]
  }'

Responses

OK response.

Bodyapplication/json
policy_evaluationobject(IaCMEvaluation)

The result of a single evaluation

Example: {"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"}
Response
application/json
{ "policy_evaluation": { "account_id": "XRQAjvT37acOiXx9PRaQMF", "action": "onrun", "created": 1636370209475, "details": [ … ], "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" } }

settings

Settings service handles all API endpoints related to configuration settings

Operations

tf-standard-backend

HTTP standard backend for Terraform

Operations

variables

Variables Service handles the API for managing workspace variables.

Operations

Exemptions

Access and modify Exemptions to Security Issues

Operations

Issues

Access and modify Security Issues

Operations

Scans

Access and modify Security Test Scans

Operations

Products

Access Scan Tool information

Operations

Test Targets

Access and modify Scan Targets

Operations

Target Variants

Access and modify Scan Target Variants

Operations

Collection categories

This contains APIs specific to the Collection categories

Operations

Collections

This contains APIs specific to Collections

Operations

Contributors

This contains APIs specific to the Contributors

Operations

DORA

This contains APIs specific to the DORA reports

Operations

Git Branches

Contains APIs related to Git Sync Branch

Operations

Git Full Sync

Contains APIs related to Git Full Sync

Operations

Git Sync Settings

Contains APIs related to Git Sync Settings

Operations

Git Sync

Contains APIs for CRUD on Git Sync

Operations

Git Sync Errors

Contains APIs related to Git Sync Errors

Operations

Error Response [Beta]

Governance Metadata [Beta]

integration

Operations

PipelineInfraConfig

Operations

SBOM

Operations

Integration Step Config

Operations

Delete Step Config

Operations

Delete Repositories

Operations

Pipeline Store Config

Operations

Evidence Vault [Beta]

Operations

Release Groups [Beta]

Operations

Releases [Beta]

Operations

Orchestration Processes [Beta]

Operations

Orchestration Activities [Beta]

Operations

Orchestration Executions [Beta]

Operations

Conflicts [Beta]

Operations

Freeze [Beta]

Operations

Reports [Beta]

Operations

Uploads [Beta]

Operations

Actions

Operations

Action Templates

Operations

Chaos Components

Operations

Chaos Hubs

Operations

ChaosGuard Conditions

Operations

ChaosGuard Rules

Operations

DR Tests

Operations

Experiments

Operations

Experiment Templates

Operations

Faults

Operations

Fault Templates

Operations

Chaos Infrastructure

Operations

Health

Operations

Network Maps

Operations

Onboarding

Operations

Probes

Operations

Probe Templates

Operations

Chaos Recommendations

Operations

Risks

Operations