We provide a very simple API server implementation in order to use the function from test codes written in other language than python (e.g. Ruby with RSpec).
Currently, the API server does not have any authentication mechanism.
We use swagger 2.0 to define the API spec (swagger definition).
The auto-generated API docs is found in docs/api/.
Before launch API server, you have to setup your python environment.
Execute below commands at the root directory.
The server will start at localhost:5000.
source venv/bin/activate
PYTHONPATH=projects FLASK_APP=./projects/bin/api.py flask runcurl
curl -X POST -H "Content-Type: application/json" http://localhost:5000/api/inference -d "{ \"html\" : \"<input type='text' name='mail_addr' placeholder='email address'>\"}"