A Flask application to manipulate monetdb and monetdbd through a user interface. The backend exposes a public API so that users can create and use their own interface.
Setting up the environment involves a few simple steps. First make sure you have pipenv installed on your machine and that the pipenv command can be found in your $PATH. If you do a user installation, you will need to add the right folder to your PATH variable.
pip3 install --user pipenv
PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin"
export PATH="$PATH:$PYTHON_BIN_PATH"
which pipenv
Then, follow the steps below in order to activate the virtual environment and start the application.
git clone [email protected]:MonetDBSolutions/flask-monetdb-api.git
cd flask-monetdb-api
pipenv install --python <python_path>
pipenv shell
./boot.sh
Open your favorite browser and navigate to http://localhost:5000
/api/v1/monetdbd/create/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"dbfarm":"mydbfarm"}' http://localhost:5000/api/v1/monetdbd/create
/api/v1/monetdbd/start/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"dbfarm":"mydbfarm"}' http://localhost:5000/api/v1/monetdbd/start
/api/v1/monetdbd/stop/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"dbfarm":"mydbfarm"}' http://localhost:5000/api/v1/monetdbd/stop
/api/v1/monetdbd/get/
[GET]
Examples: curl -v "http://localhost:5000/api/v1/monetdbd/get?dbfarm=dbfarm&property=all"
curl -v "http://localhost:5000/api/v1/monetdbd/get?dbfarm=dbfarm&property=control,discovery"
/api/v1/monetdbd/version/
[GET]
curl -v "http://localhost:5000/api/v1/monetdbd/version"
-
/api/v1/monetdb/create/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {"pass": "456"}}' http://localhost:5000/api/v1/monetdb/create
/api/v1/monetdb/start/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {}}' http://localhost:5000/api/v1/monetdb/start
/api/v1/monetdb/stop/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {"all":true}}' http://localhost:5000/api/v1/monetdb/stop
/api/v1/monetdb/kill/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {"all":true}}' http://localhost:5000/api/v1/monetdb/kill
/api/v1/monetdb/status/
[GET]
Example: curl -v "http://localhost:5000/api/v1/monetdb/status?long=true&port=50000"
/api/v1/monetdb/release/
[POST]
Example: curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {}}' http://localhost:5000/api/v1/monetdb/release
-
/api/v1/monetdb/lock/
[POST]Example:
curl -v --header "Content-Type: application/json" --request POST --data '{"databases": ["mydb5"], "options": {"port": 50000}, "arguments": {}}' http://localhost:5000/api/v1/monetdb/lock
-
/api/v1/monetdb/version/
[GET]Example:
curl -v http://localhost:5000/api/v1/monetdb/version