-
Notifications
You must be signed in to change notification settings - Fork 0
API Endpoints
Sean Glancy edited this page Feb 11, 2019
·
1 revision
BaseURL: https://recominder-api.herokuapp.com
- POST '/register' Will create new user based on request object data. Will return an error if the email is already in use. Will return a success message with the user's id on successful user creation.
- POST '/login' Will check user data supplied by request object against registered users, returning an error if not found and returning a success message with the user's id on successful login.
- POST '/data' Will accept JSON input of HealthKit data, storing it to the database and echoing the stored data back to client.
Status: Returns 'Successful', or 'Unsuccessful' .
userId: Returns the requested user's _id attribute .
token: Returns a JSON web token for web based client .
Message: Will return error messages .
{"status":"Success","userId":"5c5f66e76392220017ea2e49","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YzVmNjZlNzYzOTIyMjAwMTdlYTJlNDkiLCJpYXQiOjE1NDk3NTYxMzUsImV4cCI6MTU1NDk0MDEzNX0.dwrveYOMbXijiGwGcZAanEocOaD-YqquXFmnINR6eeY"}
{"status":"Unsuccessful","message":"This Email is already in use"}