Run the Composer command to install the latest stable version of RestJS:
composer create-project restjs/rest-api
- Create new Database with
mongodb. - Configure database variables in .env:
DATABASE_HOST = ''
DATABASE_NAME = ''
ACCESS_TOKEN = ''
json,headers_authorization,upload_file,access_token
- Get API for
GET,POST,PUT,DELETE - Upload File for
POST,DELETE
| HTTP Method | Path | Action | Scope | Desciption |
|---|---|---|---|---|
| GET | /<collection_name> | index | document:list | Get all document |
| POST | /<collection_name> | store | document:create | Create an document |
| GET | /<collection_name>/{_id} | show | document:read | Fetch an document by id |
| PUT | /<collection_name>/{_id} | update | document:write | Update an document by id |
| DELETE | /<collection_name>/{_id} | destroy | document:delete | Delete an document by id |