Exporting schemas

Schemas registered in Schema Registry can be exported into a JSON file using the Schema Registry API. The file that you export can be used to import the exported schemas into a different Schema Registry.

You have two options. You can export schemas using the command line with curl or the Schema Registry Swagger UI. The following steps walk you through how you can export schemas by using the Schema Registry Swagger UI.

  • Ensure that the cluster, its hosts, and all its services are healthy.
  • Ensure that Schema Registry is commissioned and running.
  • Ensure that you have access to all credentials that are required to access and use Schema Registry.
  • Ensure that you are logged in as a user with access to the CDP Environment containing the cluster with Schema Registry.
  1. In Management Console, go to Data Hub clusters.
  2. Find and select the Data Hub cluster you want to export schemas from.
  3. Under Services click Schema Registry.
    The Schema Registry web UI opens in a new tab.
  4. In the tab that has the Schema Registry web UI open, replace /ui/# at the end of the URL with /swagger.
  5. Select GET /api/v1/schemaregistry/schemas/aggregated.
  6. Click Try it out.
  7. Click Execute.
  8. Click Download found at the bottom right of the Response body pane to download exported schemas.
All schemas stored in the Schema Registry server are exported to a JSON file.