@baseUrl=http://localhost:3000 @username=admin @password=admin @email=admin@example.com @userType=admin @accessToken=someValueXyzXyz # Get all user IDs GET {{baseUrl}}/admin/allUserIds HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Monitor all users POST {{baseUrl}}/admin/monitorAllUsers HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get the alarm for a monitored user, if one is set GET {{baseUrl}}/user/:id/alarm HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Clear the alarm for a monitored user DELETE {{baseUrl}}/user/:id/alarm HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get a list of all alarms for monitored users GET {{baseUrl}}/alarms HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get the current user's alarm GET {{baseUrl}}/alarm/@me HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Raise an alarm (enum: one of "fall" or "toilet") PUT {{baseUrl}}/alarm/@me HTTP/1.1 Authorization: Bearer {{accessToken}} Content-Type: application/json { "reason": "fall" } ### # Clear alarm DELETE {{baseUrl}}/alarm/@me HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get assigned users GET {{baseUrl}}/monitor/assignedUsers HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Add an assigned user by ID PATCH {{baseUrl}}/monitor/assignedUsers HTTP/1.1 Authorization: Bearer {{accessToken}} Content-Type: application/json { "userId": "abcdef" } ### # Remove an assigned user by ID DELETE {{baseUrl}}/monitor/assignedUsers HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Delete account DELETE {{baseUrl}}/auth/delete HTTP/1.1 Content-Type: application/json { "username": "{{username}}", "email": "{{email}}", "password": "{{email}}" } ### # Get the budget for a monitored user GET {{baseUrl}}/user/:id/budget HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Add budget for a monitored user PATCH {{baseUrl}}/user/:id/budget HTTP/1.1 Authorization: Bearer {{accessToken}} Content-Type: application/json { "venue": "Monitor 123", "reason": "Just short for a coke to deal with diabetes", "amount": 0.15 } ### # Get all devices registered to the user GET {{baseUrl}}/auth/devices HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get the index page (empty) GET {{baseUrl}}/ HTTP/1.1 ### # Log in as a user POST {{baseUrl}}/auth/login HTTP/1.1 Content-Type: application/json { "username": "{{username}}", "email": "{{email}}", "password": "{{email}}" } ### # Log out from a device POST {{baseUrl}}/auth/logout HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Get user device by ID GET {{baseUrl}}/auth/devices/:id HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Delete user device by ID DELETE {{baseUrl}}/auth/devices/:id HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Update user device by ID PATCH {{baseUrl}}/auth/devices/:id HTTP/1.1 Authorization: Bearer {{accessToken}} Content-Type: application/json { "name": "New Device Name" } ### # Create a new user POST {{baseUrl}}/auth/register HTTP/1.1 Content-Type: application/json { "username": "{{username}}", "email": "{{email}}", "password": "{{email}}", "type": "{{userType}}" } ### # Get the server status GET {{baseUrl}}/status HTTP/1.1 ### GET {{baseUrl}}/budget/@me HTTP/1.1 Authorization: Bearer {{accessToken}} ### # Spend part of budget PATCH {{baseUrl}}/budget/@me HTTP/1.1 Authorization: Bearer {{accessToken}} Content-Type: application/json { "venue": "The Store", "reason": "Bought a coke", "amount": 0.85 } ### # Get current user GET {{baseUrl}}/auth/whoami HTTP/1.1 Authorization: Bearer {{accessToken}} ###