Login/Register to obtain an access token
The medical rest api uses auth-0 as external authentication platform. It uses JWT tokens for authorization.
In order to obtain a jwt token, go to the startsite, where you login/register
via auth-0 and obtain the token. Be sure not to share it with anyone.
The authentication token must be included in the request header as follows:
curl -X 'GET' \
'https://medical-rest-api.onrender.com/medics/1/patients?limit=20' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <my_secret_token>'
Role-based access control
There are two roles defined, Medic and Patient.
These roles have priviliges associated with them. Refer to Rest API documentation, to check which endpoint requires
which permission.
Medic:
delete:medics – Delete medic
write:medics – Create and update medics
get:patients – Read access to patients
get:records – Read access to medical records
write:records – Create and update records
delete:records – Delete records
Patient:
get:patients – Read access to patients
write:patients – Create and update patients
delete:patients Delete patient
get:records Read access to medical records
delete:records – Delete records
Note that not all endpoints require to be logged in and some require to be logged in, but have no further permissions required.
To obtain one of the / both roles, reach out to me via email after registration.