tern
tern copied to clipboard
Proposal: Enable web service API
There are situations where Tern may need to run as a service somewhere on the cloud and get access via an external API. For that to happen, it needs to respond to HTTP get and post requests. Some investigation of tools that can create a front facing API for the back end CLI may be required. https://github.com/proycon/clam might be a good place to start.
@nishakm
How is the status of this proposal?
I've made a very minimal web UI that only allow specifying an image name and return a html result by using flask. Please see the commit here. If this commit makes sense and will expected to be easily merged without a big change, I will make a pull request.
@nishakm
How is the status of this proposal?
I've made a very minimal web UI that only allow specifying an image name and return a html result by using flask. Please see the commit here. If this commit makes sense and will expected to be easily merged without a big change, I will make a pull request.
Thanks for doing the work on this! We haven't worked on this proposal yet, so your work is the first :). Would you be able to use swaggerto generate the web service API?
Another thing, @rnjudge, the web service bits should probably live in a new repository. So maybe create a new repo under tern-tools where @mkimuram can submit a PR to?
@nishakm
Thank you for your comments.
Would you be able to use swaggerto generate the web service API?
I'm not familiar with swagger, but I searched it and found that flask-restx looks useful to achieve it. With a small change, I made flask-restx generate swagger-ui. Once, the repository becomes ready, I will submit a PR.
@rnjudge
Could you create a new repo for this? What information do you need? Just a repo name?
@nishakm
What should the repo be named? 'tern-api' or 'tern-web-api'?
@mkimuram @nishakm I can create a new repo now. Does tern-web-api work for you?
@mkimuram @nishakm I can create a new repo now. Does
tern-web-apiwork for you?
@mkimuram I created https://github.com/tern-tools/tern-api. Please upload your PR here under a new web folder. We will also host the databse api bits here under a database sub folder.