token valid for a bit
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBQ0NPTVBBR05FTUVOVCIsImF1ZCI6IkNPTlNFUlZBVE9JUkVERVBFUklHVUVVWCIsImlhdCI6MTU4ODQ1MDUwMSwibmJmIjoxNTg4NDUwNTA0LCJleHAiOjE1ODg2NjY1MDEsImRhdGEiOnsiaWQiOiIxIiwiZW1haWwiOiJiZXR0eUBnbWFpbC5jb20iLCJyb2xlSUQiOiI3In19.qeX7alvzm4XCu_wQ99himT31UqpItWcyvdflXoIfJXo password hash for stratify $2y$10$ih8nTORtCj.YDoHqwnTnPuUZM2zTnD.3yMhSg1Bvj5TIFQn9Sq/ZW

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 Tokenshould be included for requests marked *
POSTeitherHTTP_AUTHORIZATION Bearer Token
orBody { "sessionToken" : "heuhnc3876" }
orParam ?sessionToken=heuhnc3876
SPECIFIC (* requires session token)doneexample
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.phpx?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
hostsC:\Windows\System32\drivers\etcto reroute 'restapi' to localhost
https://www.youtube.com/watch?v=GQDrfe2Xlvk
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
https://l.facebook.com/l.php?u=https%3A%2F%2Fyoutu.be%2FGQDrfe2Xlvk&h=AT15r27VhGE7SPaK9eUBVwYrGATHUDaTn75zGorSiYb2Et5TzTEjwdVdDjqeqWLfrfKRHlwAxdS5XmXG07OJShrel829AyBNPv2ITVRjoxlQkIuEABgCqzwDVgKK&s=1