For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use Catalog Ingestion API

Steps to use Catalog Ingestion API to ingest metadata and use the information on catalog overview and workflows

In this tutorial we will be using the catalog metadata ingestion APIs to add additional metadata for the software components in the catalog, display them in the component overview page using additional info card and track the values ingested using Scorecard.

Before you begin

  1. You must have components registered in your software catalog. If you do not have any components registered, follow this tutorial to register one. We recommend you to register this software component for this tutorial.

Add a new metadata

Use cURL command

  • Use the following command to add a new metadata codeCoverageScore to the warehouse component.

OR

Use the python script

  • You can use the python script, to auto-update the <+metadata.codeCoverageScore>

OR

Use Harness pipeline

  • We recommend the use of following Harness Pipeline to add a new metadata codeCoverageScore to the warehouse component. While using the following pipeline YAML make sure to add the x-api-key as pipeline variable of type secret and name apikey.

Harness Pipeline

Schedule a cron to update the catalog metadata

  • If you use the cURL command or the python script to auto-update the metadata on regular intervals you need to configure a cron job.

  • In case you are using Harness Pipeline use a trigger to update the data ingested on regular intervals. Create a pipeline trigger of type Cron to schedule an hourly trigger.

Code coverage scorecard {#code-coverage-scorecard}

In case you want to track the information you have ingested using Scorecards, follow the steps below.

  1. Go to the Scorecards and under Configure and select Checks from the top nav.

  2. Now select Create Custom Check and add a New Custom Check to check the code coverage score, select the data source as Catalog Info YAML and data point as Evaluate Expression(JEXL).

  3. Add the jexl to be evaluated as <+metadata.codeCoverageScore> and operator Greater than or equal to from the dropdown and add the value as 50

  4. Now you can create a scorecard using the Custom Check you have created above.

  5. Now go to the Warehouse Software Component in the Catalog, and you will find the Code Coverage Scorecard under the Scorecards tab and on the overview page. Go to Scorecards custom data sources to read more.

Additional info card {#additional-info-card}

In case you want to display the same information you have ingested on your Overview page as an additional card, follow the steps below.

  1. Go to the Layout Page and under Configure and select Catalog Entities.

  2. Now Select Edit Layout for component Service and add the following under Overview card.

  1. Now go to the Warehouse Software Component in the Catalog, and you will find an additional info card populated with information we ingested using the API above. You can read more about additional info card

Note: For detailed instructions on adding an Additional Info Card to display custom information on your entity's Overview page, see the Additional Info Card section in the Catalog Layout documentation.

Conclusion

Using the Catalog Metadata Ingestion API, you can source information into your catalog from internal systems such as cost trackers, service health checkers, security scans, or even from simple spreadsheets tracking personnel details and use them to just display the information to users as wells as use them as an input for workflows.

Check out other examples of the Catalog Ingestion API.

Last updated

Was this helpful?