- rfid: ==
String
(17 digit num) - name: ==
String
(Last, First) - doc: ==
String
(982392) - room: ==
String
(e.g 10b) 1 number && 'b' | t'' unit: ==int
GET: Index /api/residents
GET: SHOW /api/residents/{rfid}
POST: Create /api/residents body=full payload
PATCH: Update /api/residents/{rfid} body={any_updated_fields}
DELETE: Delete /api/residents/{id}
GET: Index /api/residents/{id}/timestamps
Get all timestamps for X resident DEFAULT= TODAY
GET: Show /api/residents/{id}/timestamps/{start_date}/{end_date}
========================================================
id
: int e.g. (6)name
: string e.g. (DeltaPod)
GET: Index (all locations)
GET: Show /api/locations{id}
Get the name of location X
POST: Create /api/locations{body=full_payload}
Add a new location to sign out to
GET: Show Get all timestamps for X location DEFAULT= TODAY
GET: Show Get all timestamps for X location within date range
- rfid:
string
- dest:
string
GET: Index /api/timestamps
Get timestamps for that day (default)
GET: Show /api/timestamps
POST: Create /api/timestamps/{body=timestamp}
TIMESTAMP (Sent by front-end)
[
{
"rfid": "12345678901234567",
"location": 8
}
]
RETURNS: (from back-end)
{
"rfid": "12345678901234567",
"location": 0,
"timestamp": "2019-10-10 10:10:10"
}
IF two timestamps are received at the same location, the location returned will be 0: "AWAY" and that can be checked for on the front-end, and you can send another timestamp after prompting the user
GET Show /api/timestamps/{start_date}/{end_date}