opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

list API endpoint

Open vladak opened this issue 5 years ago • 3 comments

Is your feature request related to a problem? Please describe. #3042 listed a few new API endpoints that would be useful to have. This tracks the addition of the /list endpoint for getting directory listing.

Describe the solution you'd like Return JSON array of objects:

  • name
  • date
  • size
  • number of lines
  • LOC

reflecting listing of directory. It may support getting just a single object if a file is specified.

Describe alternatives you've considered The original suggestion was to get object information for a single file with siblings (files in the same directory) however I think the above is more generic and enables directory traversal.

vladak avatar Feb 20 '20 11:02 vladak

Also it would be nice to get the path descriptions (eftar).

vladak avatar Mar 12 '20 15:03 vladak

Directory-aggregated #Lines and LOC is coming soon BTW 😎

idodeclare avatar Mar 12 '20 15:03 idodeclare

Directory-aggregated #Lines and LOC is coming soon BTW sunglasses

Oh cool. Just went through the code that deals with "extras".

vladak avatar Mar 12 '20 15:03 vladak

DirectoryListing#extraListTo() should be refactored to produce a list of objects. This method can be then used for the JSPs and API as well.

vladak avatar Apr 17 '23 12:04 vladak

Caution needs to be employed to make sure the requests against the list endpoint are authorized and projects on the top level filtered.

vladak avatar Apr 19 '23 18:04 vladak