| Restful API usage | |||
|---|---|---|---|
| temporary server | http://box5346.temp.domains/~sycamox6/anthony/ | ||
| intended live server | http://sycamore.co.uk/anthony/ | ||
| local | http://restapi/ | (run XAMPP) | |
| GET | /{tablename} and /{tablename}/{id} | ||
| POST | /{tablename} | ||
| PUT | /{tablename}/{id} | ||
| DELETE | /{tablename}/{id} | ||
| Session Token | should be included for requests marked * | ||
|---|---|---|---|
| POST | either | HTTP_AUTHORIZATION | Bearer Token |
| or | Body | { "sessionToken" : "heuhnc3876" } | |
| or | Param | ?sessionToken=heuhnc3876 | |
| SPECIFIC (* requires session token) | done | example | |||
|---|---|---|---|---|---|
| Instruments | GET | /instruments | x | ||
| GET* | /instruments/{id} | x | |||
| Cycles | GET | /cycles | x | ||
| GET* | /cycles/{id} | x | |||
| Roles | GET | /roles | x | ||
| GET* | /roles/{id} | x | |||
| - | |||||
| Usage | GET | / | x | ||
| - | |||||
| Login | POST | /login | x | ||
| Register | POST | /register | x | { |
"email":"pitty@gmail.com", "password":"bohortha", "fullName": "Prospero", "phone": "0171 740 8049", "isPupil":1, "comment":"double bass clarinettist from Tibet" } |
| Update person | PUT* | /person/{id} | |||
| Remove person | DELETE* | /person/{id} | |||
| Add child | POST* | /child | x | ||
| Update child | use Update person | ||||
| Remove child | DELETE* | /child/{id} | |||
| Add study | POST* | /study | x | ||
| Update study | PUT* | /study/{id} | |||
| Remove study | DELETE* | /study/{id} | |||
| Encrypts password for manual entry into DB | |||||
| Encrypt password | GET browser | admin/encryptpassword.php | x | ?password={myPassword} | |
| POST postman | x | {"password":"myPassword"} | |||
| ADMIN | |||
|---|---|---|---|
| .htaccess | must include HTTP_AUTHORIZATION rule | to allow session token | |
| default to use.html | shows (this) usage page | ||
| supply index.php when missing | allows simple directory address | ||
| hosts | C:\Windows\System32\drivers\etc | to reroute 'restapi' to localhost | |
| PROJECT MANAGEMENT | |||
|---|---|---|---|
| to write | Update person / study | ||
| Remove study/child/person | |||
| Change password | for user | ||
| Prereserve slot | when about to book | Is it still available? Block others | |
| Book slot | |||
| Cancel slot | (modify =cancelk & rebook) | ||
| Admin functions | change roles | ||
| to improve | Default actions after get.post.put etc | ||
| to test | accents arriving at client | ||
| to do | copy to bluehost | ||
| copy to lws | |||
| Code base | |||
| DB Server | D:\WebTools\xampp\htdocs\restapi | php mySql | |
| Ionic App | D:\App Development\ionic\Repetitions | ionic js css | Main structure/Data simulation/authorisation |
| D:\App Development\ionic\myApp | ionic js css | Navigation/Toast/Modal/Popover examples | |
| package.json | "scripts": "build": "ng build --prod", | uses src\environments\environment.prod | |
| Mock server | https://youtu.be/BtSI67Yg0Q8 | , node server.js for server | ionic serve for client app |