API demonstration.
Place the back_end_test_data.xlsx file in the storage\app\xlsx directory. This will allow the file to be ingested to the database during seeding.
Follow these steps to get the API up and running:
- Clone this repository and run
composer install - Create a database and configure the connection in the project
.envfile - Run
php artisan migrate - Run
php artisan db:seed - Run
php artisan storage:link - Run
php artisan route:cache
Endpoints are as follows:
| Endpoint | Method | Parameters | Description |
|---|---|---|---|
| property | GET | none | Get data for all properties |
| property/{property} | GET | none | Get data for specified property ID |
| property | POST | suburb, state, country | Create new property |
| property/{property} | PUT | suburb, state, country | Update existing property |
| property/{property} | DELETE | none | Delete existing property |
| Endpoint | Method | Parameters | Description |
|---|---|---|---|
| property/{property}/analytics | GET | none | Get analytics for property |
| property/{property}/analytics | POST | type, value | Add new analytic for property |
| property/{property}/analytics | PUT | type, value | Update analytic for property |
| Endpoint | Method | Parameters | Description |
|---|---|---|---|
| analytics | POST | filter, search | Get all analytics with optional filter |
Run php artisan test to test endpoint HTTP responses.
- Adam Crampton - Adam Crampton