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.
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_REMOTEfor 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):
curlandjqon 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.
Open the inline entity in the Software Catalog or Workflows view.
Open Edit.
Configure Git settings: connector, repository, branch, and YAML file path.
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.
The script:
Retrieves entities with
GET /v1/entities.Iterates over the returned entities.
Determines entity scope from
entity_ref.Constructs a Git file path under
.harness/idp.Calls
POST /v1/entities/move/{scope}/{kind}/{identifier}withentity_move_operation_type: "INLINE_TO_REMOTE".
Next steps
Git Experience for Harness IDP: Configure bi-directional sync and branch workflows after conversion.
Move an Entity API: Review request fields for single-entity conversion.
Catalog YAML: Confirm the Harness-native YAML shape written to Git.
Last updated
Was this helpful?