Extra Information
Please note that all requests made to the API require an API key as part of the URL except for the login endpoints. For example:
POST /api/users/create.php?key={apiKey}
GET /api/users/read-all.php?key={apiKey}
GET /api/users/read-range.php?from={patientID}&to={patientID}&key={apiKey}
GET /api/falls/read-date.php?id={patientID}&from={fall_date}&to={fall_date}&key={apiKey}
While in development mode, a hardcoded API key can be used (which can be found on Teams). When development mode is disabled, session tokens act as API keys, with admin tokens being able to access all endpoints.
Users
POST
researcherID
patient_nhsRef
patient_username
patient_password
patient_fName
patient_lName
patient_dob
patient_addressI
patient_addressII
patient_postcode
patient_tel
patient_mobile
patient_email
patient_comment
Create a user.
GET
patientID
Get the details of one user.
GET
Get the details of every user.
GET
patientID
Get the details of users within a patientID range.
PUT
researcherID
patient_nhsRef
patient_username
patient_password
patient_fName
patient_lName
patient_addressI
patient_addressII
patient_postcode
patient_tel
patient_mobile
patient_email
patient_comment
Update a user's details. The NHS number is used to determine which user to update the details of.
DELETE
patientID
Delete a user.
POST
patient_username
patient_password
fcmToken
Log a user into the system.
POST
patientID
Log a user out of the system.
GET
Verify a user's session token.
Falls
POST
patientID
falls
Record a user's fall.
GET
fallID
Get the details of one fall.
GET
Get the details of every fall.
GET
Get the details of every fall between two dates.
GET
patientID
Get the details of a user's every fall.
GET
patientID
fall_date
Get the details of a user's every fall between two dates.
DELETE
fallID
Delete a user's fall.
GET
patientID
Export the falls data of a user.
GET
Export the falls data of all users.
Diary Entries
POST
patientID
entry
Create a diary entry.
GET
patientID
entryID
Get the details of one diary entry.
GET
Get the details of every diary entry.
GET
patientID
Get the details of a user's every diary entry.
GET
patientID
entry_date
Get the details of a user's every diary entry between two dates.
PUT
patientID
entryID
entry
Update a user's diary entry.
DELETE
patientID
entryID
Delete a user's diary entry.
Questions
POST
patientID
question
question_charLim
question_type
choices
Create a question for a user. The "choices" piece of data would be an array.
POST
question
question_charLim
question_type
choices
Create a question for all users. The "choices" piece of data would be an array.
GET
questionID
Get the details of one question.
GET
Get the details of every question.
GET
questionID
Get the details of every question within a range of IDs.
PUT
questionID
question
question_charLim
question_type
choices
Update the details of a question. The questionID is used to determine which question to edit the details of, the ID itself cannot be changed.
DELETE
questionID
Delete a question.
Answers
POST
questionID
patientID
answer
Create an answer.
GET
answerID
Get the details of one answer.
GET
questionID
Get the details of every answer within a range of IDs.
GET
Get the details of every answer.
GET
patientID
Get the details of a user's every answer.
PUT
patientID
answerID
answer
Update the details of an answer. The answerID is only used to determine which answer to update the details of, the ID itself cannot be changed.
DELETE
answerID
Delete an answer.
Admins
POST
researcher_nhsRef
researcher_username
researcher_password
researcher_fName
researcher_lName
researcher_tel
researcher_mobile
researcher_email
Create an admin.
GET
researcherID
Get the details of one admin.
GET
Get the details of every admin.
GET
researcherID
Get the details of admins within a researcherID range.
PUT
researcher_nhsRef
researcher_username
researcher_password
researcher_fName
researcher_lName
researcher_tel
researcher_mobile
researcher_email
Update an admin's details. The NHS number is used to determine which admin to update the details of.
DELETE
researcherID
Delete an admin.
POST
researcher_username
researcher_password
Log an admin into the system.
POST
researcherID
Log an admin out of the system.
GET
Verify an admin's session token.