Skip to content

list API endpoint #3047

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

Closed
vladak opened this issue Feb 20, 2020 · 5 comments
Closed

list API endpoint #3047

vladak opened this issue Feb 20, 2020 · 5 comments

Comments

@vladak
Copy link
Member

vladak commented Feb 20, 2020

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
  • type (file/directory)
  • date
  • size
  • number of lines
  • LOC
  • title (if any - for the case when history cache is used)

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
Copy link
Member Author

vladak commented Mar 12, 2020

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

@idodeclare
Copy link
Contributor

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

@vladak
Copy link
Member Author

vladak commented Mar 12, 2020

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

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

@vladak
Copy link
Member Author

vladak commented Apr 17, 2023

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
Copy link
Member Author

vladak commented Apr 19, 2023

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

vladak added a commit to vladak/OpenGrok that referenced this issue Apr 19, 2023
@vladak vladak closed this as completed in 95c1e33 Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants