opengrok
opengrok copied to clipboard
add API endpoint to delete project metadata
#3548 presents a use case where it would be helpful to be able to remove just the project metadata, i.e. Project and related Repository objects, e.g. /projects/{project}/metadata with DELETE.
@vladak I would like to give a try on this. Can you please give me few more details on this please?
take a look at ProjectController, this should be a small change there.
@vladak
I had a look at the ProjectController file. Currently we have 2 delete API's,
-
/{project} DELETE API which handles deleting the entire project -> removing index data, removing project from its groups, removing repositories associated with that project.

-
/{project}/data DELETE API which handles deleting the index and history cache.

Question Should the current DELETE API /projects/{project}/metadata delete just the repositories of that project and not the project data? Can you please correct me if my understanding is wrong.
I am a bit confused of what is meant by project metadata that was mentioned in heading of this issue.
Metadata - what OpenGrok instance knows Data - actual files on the filesystem
Basically do the same as the already present implementation without removing any files.
Hello @vladak / @ahornace , Please see the PR, let me know if any improvements are needed.