Synadia Platform

Deleting Schemas

This guide will demonstrate how to delete both a schema revision and an entire schema using the Control Plane user interface and API.

User Interface

It is possible to delete an individual revision, or an entire schema. Both actions an irreversible.

Deleting a schema revision

To delete a single revision:

  • In the schema's account, click on the Schema Registry tab.
  • Find the schema, clicking on its Name.
  • Find the schema revision by clicking on the appropriate version/revision from the table.
  • Click on the Actions button once in the revision's page. schema-actions.png
  • Click on the Delete button to remove the revision, or Cancel to go back. delete-revision.png

Deleting a revision will take you back to the Schema Registry dashboard. The schema revision will now be permanently deleted from the Schema Registry Key Value bucket. However, all remaining schemas (assuming this was not the only revision within the schema) will remain.

Delete an entire schema

This operation will delete all versions and revisions from the registry.

To delete the entire schema:

  • Navigate the account where the schema exists and click on the Schema Registry tab.
  • Click on the three dots in row of the schema to be deleted. schema-action-delete.png
  • Click on the Delete button to remove the schema, or Cancel to go back. delete-schema.png

After clicking through the confirmation the schema will be removed and the page will refresh no longer showing the schema.

API

Access the Schema Registry API's requires an API token.

Delete a single revision

curl https://${CONTROL_PLANE_URL}/api/schema-registry/alpha/${ACCOUNT_ID}/schemas/${SCHEMA_NAME}/${VERSION}.${REVISION}/${SCHEMA_FORMAT} \
  --request DELETE \
  --header 'authorization: Bearer ${TOKEN}' \
  --header 'content-type: application/json'

Ensure the correct Version and Revision is used as there is no confirmation and whatever subject is provided will be deleted.

A 204 No Content will be returned

Delete an entire schema

curl https://${CONTROL_PLANE_URL}/api/schema-registry/alpha/${ACCOUNT_ID}/schemas/${SCHEMA_NAME}/0.0/${SCHEMA_FORMAT} \
  --request DELETE \
  --header 'authorization: Bearer ${TOKEN}' \
  --header 'content-type: application/json'

NOTE: Instead of using the version or revision number of a single schema we provide 0.0 explicitly - meaning version 0 and revision 0. This is used in place of subject wildcards (*). Internally, wildcards are used to match all versions and revisions and delete them.

Again, no confirmation is provided so be sure this is the correct schema you wish to delete.

A 204 No Content will be returned

Refer to the API documentation for more information. For Control Plane this will be https://${CONTROL_PLANE_URL}/api-docs

Previous
Updating a Schema