Skip to content

REST API Batch Delete -- Delete All Schemas #3665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bas-kirill opened this issue Apr 10, 2025 · 3 comments
Open

REST API Batch Delete -- Delete All Schemas #3665

bas-kirill opened this issue Apr 10, 2025 · 3 comments

Comments

@bas-kirill
Copy link

bas-kirill commented Apr 10, 2025

Problematic

Hey, I have ~200 schemas at Schema Registry and I need to delete them all. Now I need to write bash script for it:

for subject in $(curl -s http://localhost:8081/subjects | jq -r '.[]'); do
  echo "Deleteing '$subject'"
  curl -X DELETE "http://localhost:8081/subjects/$subject?permanent=true"
done

It is pretty uncomfortable, because it is not possible to run it in Postman / Insomnia (REST Clients). So I suppose to create a new REST API endpoint for it

Goal

  • As a developer, I need an option to delete all schemas by one REST API call, to reduce time on managing Schema Registry

Solution

  • Create a new REST API endpoint to delete all schemas by one REST API call
  • It must support soft and hard deletes
  • Possible API: curl -X DELETE "http://localhost:8081/subjects[?permanent=true]"

Sources

@javrish
Copy link

javrish commented Apr 17, 2025

Hey! I would like to work on this feature and open a PR to add a new endpoint for deleting all subjects, supporting both soft and hard deletes. Please let me know if there is any guidance or preferences I should be aware of before I start.

@bas-kirill
Copy link
Author

Hey, I think not, so we only need a soft and hard delete of all subjects by one endpoint

@javrish
Copy link

javrish commented Apr 18, 2025

Hi @bas-kirill

I'm currently contributing to this schema-registry issue and have been able to get most of the environment set up and started working through the changes locally.

However, I'm hitting a blocker while trying to build the common module — specifically:

Failed to execute goal io.confluent:resolver-maven-plugin:0.6.0:resolve-kafka-range
MojoExecutionException: Could not find any ccs-kafka artifacts.

It seems the resolver-maven-plugin is trying to pull in internal ccs-kafka artifacts that aren't publicly resolvable.

Is there an OSS-friendly build profile or a documented workaround to bypass this dependency, especially for external contributors?
Just looking to get past these steps so I can validate and test the changes I'm working on.

Appreciate any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants