https://github.com/tbreuss/notes-api
:green_book: REST-API for Notes Management Tool
https://github.com/tbreuss/notes-api
jwt-authentication notes-app php7 rest-api yii2
Last synced: 8 months ago
JSON representation
:green_book: REST-API for Notes Management Tool
- Host: GitHub
- URL: https://github.com/tbreuss/notes-api
- Owner: tbreuss
- License: mit
- Created: 2018-11-18T15:20:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-09T16:31:14.000Z (over 7 years ago)
- Last Synced: 2025-05-03T20:35:39.619Z (11 months ago)
- Topics: jwt-authentication, notes-app, php7, rest-api, yii2
- Language: PHP
- Homepage: https://notes.tebe.ch
- Size: 106 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notes Management Tool – REST-API
[](http://www.yiiframework.com/)
The REST-API for the Notes Management Tool.
Note: This is the API only.
You need the appropriate client which is hosted at .
## Install
git clone https://github.com/tbreuss/notes-api.git
cd notes-api
composer install
## Create/import database
Create a database at your hosting provider and import `config\mysql-dump.sql`.
## Config
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.
## Run
cd notes-server
php yii serve -p 8888
Open your webbrowser
You should see:
REST-API for Notes Management Tool
You need an appropriate client to access this API
https://github.com/tbreuss/notes-client
https://notes.tebe.ch
## Build
composer build
Build a zip archive for production. Needs globally installed `git` and `composer` and an existing `config/prod.env.php`.
## Endpoints
To be done.
### GET v1/ping
### POST v1/login
### GET v1/articles/
### PUT v1/articles/
### DELETE v1/articles/
### GET v1/articles
### POST v1/articles
### GET v1/articles/latest
### GET v1/articles/liked
### GET v1/articles/modified
### GET v1/articles/popular
### POST v1/articles/upload
### GET v1/users/
### GET v1/users
### GET v1/tags/
### GET v1/tags
### GET v1/tags/selected
## cURL calls
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"