opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

add API endpoint to delete project metadata

Open vladak opened this issue 4 years ago • 5 comments

#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 avatar Apr 20 '21 12:04 vladak

@vladak I would like to give a try on this. Can you please give me few more details on this please?

harshachinta avatar Aug 29 '21 06:08 harshachinta

take a look at ProjectController, this should be a small change there.

vladak avatar Aug 29 '21 12:08 vladak

@vladak

I had a look at the ProjectController file. Currently we have 2 delete API's,

  1. /{project} DELETE API which handles deleting the entire project -> removing index data, removing project from its groups, removing repositories associated with that project. image

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

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.

harshachinta avatar Aug 29 '21 15:08 harshachinta

Metadata - what OpenGrok instance knows Data - actual files on the filesystem

Basically do the same as the already present implementation without removing any files.

ahornace avatar Aug 29 '21 15:08 ahornace

Hello @vladak / @ahornace , Please see the PR, let me know if any improvements are needed.

tyagi-data-wizard avatar Mar 18 '23 07:03 tyagi-data-wizard