The REST-API for the Notes Management Tool.
Note: This is the API only. You need the appropriate client which is hosted at https://github.com/tbreuss/notes-client.
git clone https://github.com/tbreuss/notes-api.git
cd notes-api
composer install
Create a database at your hosting provider and import config\mysql-dump.sql
.
Copy configuration files:
cd config
cp db.dist.php db.php
cp params.dist.php params.php
Edit both files according to your config settings.
cd notes-server
php yii serve -p 8888
Open your webbrowser http://localhost:8888/
You should see:
<response>
<title>REST-API for Notes Management Tool</title>
<info>You need an appropriate client to access this API</info>
<github>https://github.com/tbreuss/notes-client</github>
<url>https://notes.tebe.ch</url>
</response>
composer build
Build a zip archive for production. Needs globally installed git
and composer
and an existing config/prod.env.php
.
To be done.
To be done.
Post login
curl -i --header "Content-Type: application/json" --request POST --data '{"username":"xyz","password":"xyz"}' http://localhost:8888/v1/login
curl -i --header "Content-Type: application/json" --request OPTIONS --data '{"username":"xyz","password":"xyz"}' http://localhost:8888/v1/login
curl -i -X OPTIONS http://localhost:8888/ --header "Content-Type: application/json"