> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cortex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing data from Harness

> Automatically sync and map your Harness pipelines and deployments

PRIVATE BETA

> [!NOTE]
>
> Importing Harness pipelines and deployments is in Private Beta. To request access, contact the [Cortex Customer Engineering](mailto:help@cortex.io) team.

> [!NOTE]
>
> Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor's documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.

This article explains how Cortex imports pipelines and deployments from Harness and maps them to your entities. For configuration instructions, see [Configuring Harness](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness). For what you can do once your data is imported, see [Using the integration for Harness](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness/using-the-integration-for-harness.md).

> [!NOTE]
>
> Harness limits API usage to 400 requests per minute, so syncing data can take a long time for larger accounts. For details, including how to request a higher rate limit, see [How Cortex syncs Harness data](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness#how-cortex-syncs-harness-data).

Cortex shows Harness pipelines and deployments on an entity once the entity is linked to one or more Harness services. There are two ways to link them:

* **Automatic matching** - Cortex links a Harness service to an entity when the service details match in both systems. You don't need to register anything.
* **Registration** - You choose the Harness services for an entity yourself, in the entity's YAML or from the entity's details page.

If an entity has registered Harness services, Cortex uses only those and ignores automatic matches for that entity.

## How Cortex matches Harness services automatically

Cortex compares the entity's tag (`x-cortex-tag`) to the following values on each Harness service, without regard to case:

* The service identifier.
* The service name.
* The value of the service's `cortex.entity` tag in Harness.

For example, an entity tagged `payments-api` matches a Harness service named `payments-api`, or a service with the Harness tag `cortex.entity: payments-api`. Because Harness removes hyphens from identifiers, the service name or the `cortex.entity` tag is often the more reliable match.

> [!NOTE]
>
> If your organization uses a different Harness tag key to name Cortex entities, contact the [Cortex Customer Engineering](mailto:help@cortex.io) team to add it to your account's matching rules.

## Registering Harness services for an entity

Register Harness services when automatic matching doesn't link the right service, or when one entity deploys through several services.

### Registering services from an entity's details page

1. Navigate to an [entity's details page](https://docs.cortex.io/ingesting-data-into-cortex/entities-overview/entities/details.md).
2. In the upper-right corner, click **Configure entity**.
3. From the left sidebar, locate the **Connections** section, then select the **CI/CD** tab.
4. From the **Services** dropdown, select the Harness services to link to the entity.
5. Click **Save changes**.

### Registering services in the YAML

To register Harness services in the YAML, add an `x-cortex-ci-cd` block with a `harness` entry to the entity's descriptor.

> [!NOTE]
>
> The YAML examples on this page show only the `x-cortex-*` block. When you add one to an entity descriptor, nest it inside the `info` section. Blocks at the root level of the file are ignored without an error. For a full example, see [Defining entities with YAML](https://docs.cortex.io/ingesting-data-into-cortex/entities-overview/entities/yaml#metadata-in-entity-descriptor-yaml-files).

```yaml theme={null}
x-cortex-ci-cd:
  harness:
    services:
      - orgIdentifier: default
        projectIdentifier: payments
        identifier: paymentsapi
```

To link more than one service, add another entry under `services`:

```yaml theme={null}
x-cortex-ci-cd:
  harness:
    services:
      - orgIdentifier: default
        projectIdentifier: payments
        identifier: paymentsapi
      - orgIdentifier: default
        projectIdentifier: payments
        identifier: paymentsworker
```

Harness services have the following field definitions:

| Field | Description | Required |
| - | - | - |
| `orgIdentifier` | The identifier of the Harness organization that owns the service. | |
| `projectIdentifier` | The identifier of the Harness project that owns the service. | |
| `identifier` | The identifier of the Harness service. | |

You can find all three identifiers in the service's URL in Harness. Cortex skips any entry that is missing one of them.


## Related topics

- [Harness](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness.md)
- [Using the integration for Harness](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness/using-the-integration-for-harness.md)
- [Importing entities from AWS](https://docs.cortex.io/ingesting-data-into-cortex/integrations/aws/importing-entities-from-aws.md)
