opengrok
opengrok copied to clipboard
list API endpoint
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.
Also it would be nice to get the path descriptions (eftar
).
Directory-aggregated #Lines and LOC is coming soon BTW 😎
Directory-aggregated #Lines and LOC is coming soon BTW sunglasses
Oh cool. Just went through the code that deals with "extras".
DirectoryListing#extraListTo()
should be refactored to produce a list of objects. This method can be then used for the JSPs and API as well.
Caution needs to be employed to make sure the requests against the list endpoint are authorized and projects on the top level filtered.