Skip to main content

Harness Data Source

The Harness connector enables you to ingest software delivery data — including pipeline executions, deployments, feature flags, cloud cost records, security test results, and more — directly into Nexla for reporting, monitoring, and downstream analysis. Follow the instructions below to create a new data flow that ingests data from a Harness source in Nexla.
harness_api.png

Harness

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Harness connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Harness instance, and click Next; or, create a new Harness credential for use in this flow.

  3. In Nexla, Harness data sources can be created using pre-built endpoint templates, which expedite source setup for common Harness endpoints. Each template is designed specifically for the corresponding Harness endpoint, making data source setup easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Harness sources can also be configured manually, allowing you to ingest data from Harness endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Harness endpoints. Each template is designed specifically for the corresponding Harness endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

    List Organizations

    Returns a list of organizations accessible to the authenticated user. Use this endpoint to retrieve all organizations within a Harness account for reporting or to obtain organization identifiers for use in project-level API calls.

    • Sends a GET request to /ng/api/organizations using the base URL configured in your Harness credential.
    • Response data is extracted from $.data.content[*], returning each organization as an individual record.

    Organization identifiers returned by this endpoint are required as the orgIdentifier parameter for project-level and pipeline-level Harness API endpoints.

    List Connectors

    Lists connectors configured in the Harness account, including source-code repositories, artifact registries, cloud providers, and more. Use this endpoint to audit connector inventory or export connector configurations.

    • Sends a GET request to /ng/api/connectors using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each connector as an individual record.

    The Harness API requires the accountIdentifier query parameter for most endpoints. Ensure that this parameter is included in the URL or is set via your credential configuration.

    List Projects

    Lists all projects within a Harness account or organization. Projects are the fundamental scoping resource for all pipeline and deployment activity in Harness. Use this endpoint to enumerate projects for reporting or to obtain project identifiers for downstream calls.

    • Sends a GET request to /ng/api/projects using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each project as an individual record.

    Project identifiers returned here are required as the projectIdentifier parameter for pipeline, environment, and service endpoints.

    List Environments in a Project

    Lists environments defined within a Harness project. Use this endpoint to retrieve environment configurations for deployment tracking, change management reporting, or environment auditing.

    • Sends a GET request to /ng/api/environments using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each environment as an individual record.

    Scope results to a specific project by including the accountIdentifier, orgIdentifier, and projectIdentifier query parameters in the endpoint URL.

    List Services in a Project

    Lists services defined within a Harness project. Use this endpoint to retrieve service definitions for software catalog population, deployment reporting, or service ownership auditing.

    • Sends a GET request to /ng/api/servicesV2 using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each service as an individual record.

    Include accountIdentifier, orgIdentifier, and projectIdentifier query parameters to scope results to a specific project.

    Get Pipeline Execution Details

    Retrieves the full details and status of a specific pipeline execution by its execution ID. Use this endpoint to monitor individual pipeline runs, capture execution outcomes, or trigger downstream actions based on execution status.

    • Sends a GET request to /pipeline/api/pipelines/execution/{executionId} using the base URL configured in your Harness credential.
    • Response data is extracted from $.data, returning the full execution details as a single record.
    • Configure the following parameters: Execution ID — the unique identifier of the pipeline execution to retrieve.

    Execution IDs can be obtained from the List Pipeline Execution History endpoint. Use a lookup macro to pass execution IDs dynamically when chaining API calls.

    List Pipeline Execution History

    Lists the execution history for pipelines within a Harness project. Use this endpoint for DORA metrics reporting, deployment frequency analysis, or change failure rate calculations.

    • Sends a GET request to /pipeline/api/pipelines/execution/v2/executions using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each execution record individually.

    Use date/time macros in conjunction with time-range filter parameters to perform incremental ingestion of only recent pipeline executions.

    List Pipelines in a Project

    Lists all pipelines defined within a Harness project. Use this endpoint to audit pipeline configurations, export pipeline metadata for governance reporting, or obtain pipeline identifiers for execution-related API calls.

    • Sends a GET request to /pipeline/api/pipelines/v2 using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each pipeline as an individual record.

    Include accountIdentifier, orgIdentifier, and projectIdentifier as query parameters to scope results to a specific project.

    List Secrets

    Returns a list of secrets in the specified scope (account, org, or project), including text secrets, file secrets, and SSH keys. Use this endpoint to audit secret inventory or identify unused credentials for rotation or cleanup.

    • Sends a POST request to /ng/api/v2/secrets/list using the base URL configured in your Harness credential.
    • Response data is extracted from $.data.content[*], returning each secret record individually. Note: secret values are never returned by the API — only metadata.

    Only secret metadata (name, type, scope, tags) is returned — secret values are never exposed via the API. Scope the request to account, org, or project level using the appropriate identifier parameters.

    List Role Assignments

    Returns a list of role assignments in the given scope (account, org, or project). Use this endpoint to audit access control configurations, produce least-privilege reports, or export role assignment data for compliance.

    • Sends a GET request to /authz/api/roleassignments using the base URL configured in your Harness credential.
    • Response data is extracted from $.data.content[*], returning each role assignment as an individual record.

    Role assignment data is available at account, org, and project scope. Include the appropriate identifier parameters to scope the results correctly for your use case.

    List Users

    Returns a list of users in the Harness account, including profile and role information. Use this endpoint to export user directories, audit account membership, or synchronize Harness users with external identity systems.

    • Sends a GET request to /ng/api/user/aggregate using the base URL configured in your Harness credential.
    • Response data is extracted from $.data.content[*], returning each user as an individual record.

    Admin-level permissions are required to list all users in the account.

    List Account Roles

    Returns a list of roles defined at the account scope in Harness. Use this endpoint to enumerate available roles for access control reporting or to retrieve role IDs for use in role assignment operations.

    • Sends a GET request to /v1/account-roles using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each account role as an individual record.

    Account-scope roles are defined at the top level and apply across all organizations and projects. Use role IDs from this endpoint when creating role assignments.

    List Account Secrets

    Returns a list of account-scoped secrets from the Harness platform. Use this endpoint to audit account-level secret inventory for security governance or credential rotation planning.

    • Sends a GET request to /v1/secrets using the base URL configured in your Harness credential.
    • Response data is extracted from $.data[*], returning each secret record as an individual entry. Secret values are never returned — only metadata.

    This endpoint returns account-scoped secrets only. For org- or project-scoped secrets, use the List Secrets endpoint with the appropriate scope parameters.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

Harness sources can be configured to ingest data from any valid Harness REST API endpoint. The Harness REST API base URL is https://app.harness.io/ng/api and provides access to pipelines, deployments, feature flags, cloud cost data, connectors, organizations, projects, and more. Configuration options allow sources to be fully customized to suit any use case — including using chained API calls to fetch data from multiple endpoints.

First, select the API method that will be used for calls to the Harness API from the Method pulldown menu. The most common methods are:

  • GET: For retrieving data from the API — the primary method for ingesting Harness data into Nexla
  • POST: For sending data to the API, querying resources with request bodies, or triggering actions such as pipeline executions
  • PUT: For updating existing resources
  • PATCH: For partial updates to existing resources
  • DELETE: For removing resources

API Endpoint URL

  1. Enter the URL of the Harness API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL, including the protocol and any required query parameters such as accountIdentifier.

    Most Harness API endpoints require the accountIdentifier query parameter. Your Account Identifier can be found in Account Settings > Account Overview in the Harness platform. Common Harness REST API endpoints include:

    • List pipelines in a project: https://app.harness.io/ng/api/pipelines?accountIdentifier={'{accountId}'}&orgIdentifier={'{orgId}'}&projectIdentifier={'{projectId}'}
    • List pipeline executions: https://app.harness.io/ng/api/pipeline/execute/summary?accountIdentifier={'{accountId}'}&orgIdentifier={'{orgId}'}&projectIdentifier={'{projectId}'}
    • List organizations: https://app.harness.io/ng/api/organizations?accountIdentifier={'{accountId}'}
    • List projects: https://app.harness.io/ng/api/projects?accountIdentifier={'{accountId}'}&orgIdentifier={'{orgId}'}
    • List feature flags: https://app.harness.io/cf/admin/features?accountIdentifier={'{accountId}'}&orgIdentifier={'{orgId}'}&projectIdentifier={'{projectId}'}
    • List connectors: https://app.harness.io/ng/api/connectors?accountIdentifier={'{accountId}'}

    Replace {'{accountId}'}, {'{orgId}'}, and {'{projectId}'} with your Harness Account Identifier, Organization Identifier, and Project Identifier respectively.

The Harness REST API uses accountIdentifier, orgIdentifier, and projectIdentifier as required query parameters for most endpoints. All requests must be made over HTTPS. The API supports pagination using pageIndex and pageSize query parameters. For complete API reference documentation, see the Harness API Reference.

Date/Time Macros (API URL)

Optional

Optionally, the API URL can be customized using macros — all macros added to the API URL will be converted into values when Nexla executes the API call. Macros are dynamic placeholders that allow you to create flexible API endpoints that can adapt to different time periods or data requirements.

This is particularly useful for Harness endpoints that support time-based filtering, such as filtering pipeline executions by start time or querying deployments within a specific date range.

Macros are particularly useful for APIs that require date ranges, pagination parameters, or other dynamic values that change between data ingestion runs.

  1. To add a macro, type { at the appropriate position in the API URL (within the Set API URL field), and select the desired macro from the dropdown list.

    • {now} – The current datetime
    • {now-1} – The datetime one time unit before the current datetime
    • {now+1} – The datetime one time unit after the current datetime
    • custom – Datetime macros can reference any number of time units before or after the current datetime — for example, enter (now-4) to indicate the datetime four time units before the current datetime
  2. Select the format that will be applied to datetime macros from the Date Format for Date/Time Macro pulldown menu. This format will be applied to the base datetime value of the macro — i.e., the value of {now} in {now-1}.

  3. Select the datetime unit that will be used to perform mathematical operations in the included macro(s) from the Time Unit for Operations pulldown menu — for example, for the macro {now-1}, when Day is selected, {now-1} will be converted to the datetime one day before the current datetime.

Lookup-Based Macros (API URL)

Optional

Column values from existing lookups can also be included as macros in the API URL. Lookup-based macros allow you to reference data from previously configured data sources or lookups, enabling dynamic API endpoints that can adapt based on existing data.

Lookup-based macros are useful when you need to create API endpoints that reference specific IDs, values, or parameters from other data sources in your Nexla environment. For example, you could use a lookup macro to iterate over a list of Harness project identifiers retrieved from a prior API call.

  1. To include a lookup column value macro, select the relevant lookup from the Add Lookups to Supported Macros pulldown menu.

  2. Type { at the appropriate position in the API URL, and select the lookup column-based macro from the dropdown list. Lookup-based macros are automatically populated into the macro list when a lookup is selected in the Add Lookups to Supported Macros pulldown menu.

Path to Data

Optional

If only a subset of the data returned by the API endpoint is needed, you can designate the part(s) of the response that should be included in the Nexset(s) produced from this source by specifying the path to the relevant data within the response. Harness API responses typically wrap the actual data records inside a data or content object, so specifying the correct path is important for proper data parsing.

For example, when requesting a list of pipelines, the Harness API returns a JSON response where the pipeline records are nested inside data.content[*]. By entering the path to the relevant data, you can configure Nexla to treat each element of the returned array as a record.

Path to Data is essential when API responses have nested structures. Without specifying the correct path, Nexla might not be able to properly parse and organize your data into usable records.

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field.

    • For responses in JSON format, enter the JSON path that points to the object or array that should be treated as relevant data. JSON paths use dot notation (e.g., $.data.content[*] to access an array of content items within a data object).
    Path to Data Example:

    For a Harness pipeline list response that returns records in a nested structure, enter $.data.content[*] as the Path to Data to extract each pipeline object as a separate record.

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content & format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. This is useful when you want to preserve important contextual information that applies to all records but isn't part of the main data array.

For example, when requesting a list of pipeline executions, the Harness API response may include pagination metadata such as total count and page number alongside the array of execution records. If you have specified the path to the relevant data but want to preserve this metadata, you can specify a path to include it with each record.

Metadata paths are particularly useful for preserving API response context like total record counts, pagination details, or request-level status information that applies to all records in the response.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field.

    • For responses in JSON format, enter the JSON path to the object or array that contains the metadata.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers and corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers may be required for API versioning or content type specifications.

    You do not need to include the x-api-key authentication header, as it is handled automatically by Nexla using the API key stored in your Harness credential. Common headers like Content-Type and Accept are also managed automatically.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new Harness data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.