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

Convert inline entities to remote

Convert Harness IDP inline Catalog entities and Workflows to remote Git-backed entities

Inline entities store YAML in the Harness database. Remote entities store YAML in your Git repository and use Git Experience for bi-directional sync. Use this guide when you need to move existing inline Catalog entities or Workflows to Git.

One entity per YAML file

Each remote entity must use its own YAML file. Go to Catalog YAML for the Harness-native entity schema.


What you will learn from this topic

  • Inline vs remote: When entity YAML lives in Harness versus Git.

  • Convert in the UI: Move one entity to Git from the Edit page.

  • Convert with the API: Call Move Entity with INLINE_TO_REMOTE for a single entity.

  • Convert in bulk: Run a script that lists entities and calls the same API for each one.


Before you begin

  • Git connector: A connector for the target repository. Go to Git Experience for Harness IDP for supported providers.

  • Repository and branch: The repo and branch where entity YAML files will be written.

  • Permissions: IDP Catalog Create/Edit (and Workflow Create/Edit when converting Workflows). For API or script conversion, use an API key with those permissions.

  • Tools (API and script): curl and jq on the machine that runs the requests.

Go to Git Experience for Harness IDP for how remote entities sync after conversion.


Convert with the UI

Convert one entity at a time from the entity Edit page.

  1. Open the inline entity in the Software Catalog or Workflows view.

  2. Open Edit.

  3. Configure Git settings: connector, repository, branch, and YAML file path.

  4. Save. Harness moves the entity YAML to Git and enables Git-based tracking.


Convert one entity with the Move Entity API

Use the Move an Entity API to convert a single inline entity to remote.

Endpoint:

Example request:

Replace scope with account, account.orgId, or account.orgId.projectId as appropriate. Set kind to the entity kind (for example component, api, resource, or workflow).


Convert in bulk with a script

For larger migrations, use the following script. It lists entities with GET /v1/entities, builds a scoped file path under .harness/idp, and calls Move Entity with INLINE_TO_REMOTE for each entity.

Prerequisites

Set HARNESS_ACCOUNT, X_API_KEY, CONNECTOR_REF, REPO_NAME, and BRANCH_NAME before you run the script. Adjust KIND for the entity kinds you want to convert (comma-separated values are supported).

The script:

  1. Retrieves entities with GET /v1/entities.

  2. Iterates over the returned entities.

  3. Determines entity scope from entity_ref.

  4. Constructs a Git file path under .harness/idp.

  5. Calls POST /v1/entities/move/{scope}/{kind}/{identifier} with entity_move_operation_type: "INLINE_TO_REMOTE".


Next steps

Last updated

Was this helpful?