api-notes
It is a simple authenticated API to get notes assigned to an user.
Highlights
- Simple API
- Fully documented
- Fully unit tested
- Utilizes JWT to Authentication
- Developed in Lumen v5.3
System Requirements
You need PHP >= 5.6.4 to use this API, but the latest stable version of PHP is recommended.
api-notes is verified and tested on PHP 5.6 and 7.0.
It's necessary have installed OpenSSL, PDO and Mbstring PHP Extension.
This api is authenticated by JWT, then, it's interesting that you read the JWT Auth wiki
Installation
Follow steps below to can install the api:
$ composer install
$ php artisan jwt:secret
and put the code in .env file- create .env file
$ php artisan migrate
$ php artisan db:seed
Enjoy it!
API
See the full documentation through this link.
Route | Description |
---|---|
POST api/auth |
Generates an JWT token to enable an user to use the API |
POST api/logout |
Invalidates the JWT token (require JWT token to authorize access) |
GET api/notes |
Returns all notes from an user (require JWT token to authorize access) |
GET api/notes/{id} |
Returns only one note from an user (require JWT token to authorize access) |
POST api/notes |
Stores an note assigned to an user (require JWT token to authorize access) |
PUT api/notes/{id} |
Updates an note assigned to an user (require JWT token to authorize access) |
DELETE api/notes/{id} |
Deletes an note assigned to an user (require JWT token to authorize access) |
POST api/sign_up |
Stores an new user |
POST api/reset |
Sends email to reset password from an user |
PUT api/reset/{token} |
Resets the user password |
I'm suggest you to use Postman to test the API. See the collection v1 or v2 to you import in your Postman
License
api-notes is open-sourced software licensed under the MIT License (MIT). Please see LICENSE for more information.