Harness Pipelines
By integrating Harness Pipelines with DX, you can analyze pipeline execution data, deployment metrics, and build performance across your CI/CD workflows. Please refer to the API documentation below and our schema explorer to see what data DX imports.
Prerequisites
To connect Harness Pipelines to DX, you need:
- a Harness API key (see Permissions for what access it must have)
- your Harness Account ID
- (optional) your Harness base URL if using a custom instance
Permissions
We recommend a Harness service account whose role includes the access below, with an API key created for that account. The key does not carry its own scopes; it inherits the permissions of the account it belongs to.
Grant the account permission to:
- Organizations: read and list organizations at the account.
- Projects: read and list projects under those organizations.
- Pipeline executions: read and list pipeline execution data (including execution summaries and related execution details) for the orgs, projects, and pipelines DX should ingest.
If the token lacks any of this access, DX may return invalid_permissions or no_resources when you add the connection.
Setup instructions
Follow the steps below to connect Harness Pipelines to DX.
Step 1
In Harness, ensure you have a service account (or user) with the permissions above. Create an API key for that account (for example from profile or account security settings, depending on your Harness setup).
Step 2
Locate your Harness Account ID from your account settings or URL.
Step 3
- Navigate to the connections page in DX and select “+ Connection” in the top right.
- Enter the credentials you have generated in the previous steps:
- Harness API Key (required)
- Harness Account ID (required)
- Harness Base URL (optional, defaults to
https://app.harness.io)
Refer to the information below for errors and troubleshooting.
API reference
The table below lists the specific API endpoints that are used by DX.
| Endpoint | Documentation |
|---|---|
| /v1/orgs | Link |
| /v1/orgs/{orgIdentifier}/projects | Link |
| /pipeline/api/pipelines/execution/summary | Link |
Errors
The table below lists potential error codes when adding a connection in DX.
| Error | Description |
|---|---|
invalid_credentials |
Your API credentials entered are not valid. |
invalid_permissions |
Your API token does not have the permissions required by DX. |
no_resources |
DX cannot access any Harness organizations or projects with the provided credentials. |