Skip to content
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

RESTful API for Messages #1801

Closed
noorflex opened this issue Oct 3, 2017 · 7 comments · Fixed by #2184
Closed

RESTful API for Messages #1801

noorflex opened this issue Oct 3, 2017 · 7 comments · Fixed by #2184

Comments

@noorflex
Copy link

noorflex commented Oct 3, 2017

is there a json API which gives me list of all projects which i can display in my interface.

@vladak
Copy link
Member

vladak commented Oct 3, 2017

The existing web services (https://github.com/OpenGrok/OpenGrok/wiki/OpenGrok-web-services) are more tailored for searching. You can use Messages script to get the list of projects remotely however exposing the listening port to anyone is not a wise choice as this can be used to write configuration. Marking as enhancement - feel free to submit a pull req.

@vladak
Copy link
Member

vladak commented Oct 4, 2017

Ideally the code in ProjectMessage.java should be refactored and used for web services API.

@vladak
Copy link
Member

vladak commented Oct 4, 2017

Also, it's not clear to me whether currently the web services API is going through authorization code. @tulinkry ?

@vladak
Copy link
Member

vladak commented Oct 4, 2017

The other thing to solve is how to authorize the project (non-search) related requests. Pre-shared key passed in custom HTTP header ? Basic HTTP authentication serving as authorization ? Or allow anyone when coming from localhost ? I mean for super-user kind of access that could be used by indexing scripts.

@noorflex
Copy link
Author

noorflex commented Oct 5, 2017

Right, Existing web services are for searching, but to limit the scope of search to a subset of project (e.g one set of Branch out of many branches) will give more control to search.

@vladak vladak changed the title getting list of projects in json RESTful API for Messages Jan 17, 2018
@vladak
Copy link
Member

vladak commented Jan 17, 2018

Once this is addressed, the Python scripts under tools/scripts/ (in particular opengrok.py) should be changed to leverage the RESTful API instead of executing the Messages script.

vladak pushed a commit that referenced this issue Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants