Catalog Ingestion API
Update Catalog Metadata using Ingestion APIs
Software Catalog in Harness IDP supports modifying metadata associated with the services, libraries, websites and any other entities registered in the Catalog, without having to manually edit the catalog-info.yaml. This allows integrations with many systems such as cost trackers, service health checkers, security scans or even simple spreadsheets tracking personnel details like who is on-call this week.
The ingested data can be used to display on the UI, can be consumed in Custom Plugins and measured in Scorecard Checks.

Use cases - API quick overview
1. Update a single property of a single catalog entity
2. Update multiple properties of a single catalog entity
3. Update a single property of multiple catalog entities
4. Update a single property of multiple unspecified catalog entities using filters
5. Update a single property of a catalog entity without replacing existing values
Note:
appendonly works with data types that can hold multiple values, such as arrays or maps. It does not apply to simple data types like strings.
Common API request details
API base URL
https://app.harness.io/gateway/v1/
Headers
You can generate your Harness API Keys by following the Harness API Key docs.
You can find your account ID in any of your Harness URLs, for example: https://app.harness.io/ng/account/<ACCOUNT_ID>/idp/overview.
Detailed API usage and examples
Update a single property of a single catalog entity
cURL example
Endpoint
HTTP Method
POST
URL
Request body
In the above example, we update/add only the metadata.codeCoverageScore property for the mentioned entity boutique-service.
Update multiple properties of a single catalog entity
cURL example
Endpoint
HTTP method
POST
URL
Request body
In the above example, we add the metadata.codeCoverageScore & metadata.cloudCost properties for the mentioned boutique-service.
Update a single property of multiple catalog entities
cURL example
Endpoint
HTTP method
POST
URL
Request body
In the above example, we add the metadata.releaseVersion property for the mentioned entities.
Update a single property of multiple unspecified catalog entities using filters
HTTP method
POST
URL
Request body
skip_entity_refs: (Optional) Entities mentioned in this array are not modified with this request.
field: It contains the information on the metadata name to be added, here in the above example it would ingest the
teamLeadunder metadata. This will not append your catalog-info.yaml stored in your git, rather you could view the changes on IDP.
filter: This is used to identify the software components where you want to ingest the new entity, you can filter through
kind,type,owners,lifecycleandtags. Where onlykindis the mandatory fields.
Update a single property of a catalog entity without replacing existing values
cURL example
Endpoint
HTTP method
POST
URL
Request body
When you want to update a specific property of a catalog entity, you can use different modes to control how the update behaves. The default mode is replace, which completely overwrites the existing value. However, you can use other modes like append for complex datatype like array to preserve the existing values while adding new ones.
Available modes:
replace (default): Completely replaces the existing value with the new one provided in the
valuefield.append: Adds new values to the existing array (or other types to be appended like maps or key-value pairs).
Note:
appendonly works with data types that can hold multiple values, such as arrays or maps. It does not apply to simple data types like strings.
Example 1: Add a property to the entity (no mode specified)
By default, when you add a property to an entity, it uses the replace mode to set the value.
This sets the metadata.tags for boutique-service to "scala" replacing the existing values
Example 2: Add new values to the entity
To add new tags without replacing the existing ones, you can use the append mode.
Result: The metadata.tags property will now be ["scala", "python", "java", "c++"], with the new values added to the existing ones.
Example 3: Add a new annotation
To add a new annotation under, metadata we can append the metadata.annotations field.
Result: The metadata.annotations property will now add harness.io/pipelines to the existing annotations. If harness.io/pipelines annotations already exists then this will overwrite the same.
When to use each mode:
replace: Use when you want to completely replace the value of a property. For example, if the existing tags are outdated, and you want to set new ones.append: Use when you want to add new values without losing the current values, applicable to array or map types. This is useful for incremental updates like adding a new annotation to thecatalog-info.yaml.
Other examples
Dry run
Using the dry_run field, you can check all the metadata and components getting affected by the Catalog Metadata Ingestion API without actually modifying them. dry_run will not apply any change rather will provide a preview of all the changes as shown in the example below.
As you could see in the example above we display the affected software components under entity_refs. To use dry_run you need to add ?dry_run=true field in the URL
Advanced example of using catalog filters
Delete a single custom property for a given entity
Note that this only works for the custom properties added using the Ingestion APIs. This API will not remove any property added using the Catalog Info YAML.
Delete multiple properties for a given entity
Delete a single property for multiple entities
Delete one property on unspecified catalog entities using filters
In the above example it will delete the property metadata.teamLead, across all the entities except order-service mentioned under skip_entity_refs.
Get catalog custom properties for a given entity
Get entities associated with a custom property
Other catalog endpoints
This page describes only the ingestion related Catalog endpoints. Look at other Catalog API endpoints which contains basic endpoints for fetching full entity, registering and unregistering entities.
API takes priority over catalog YAML file (in case of a conflict)
Any property updated using Ingestion APIs will take priority over what is specified in the Catalog Info YAML files. For example, if a catalog-info.yaml has the following
And you use the Ingestion API to update the metadata.customProperty to valueB. Then the final value of the property will be valueB. However, note that this will not update the actual catalog-info.yaml inside your Git repository.
Last updated
Was this helpful?

