@ -19,24 +19,41 @@ An application that allows a family to track family members via live tracking an
- As a user, I should be warned if a location I am going to is suspicious or susceptible to danger.
- As a user, I should be warned if a location I am going to is suspicious or susceptible to danger.
## Data Endpoints
## Data Endpoints
All endpoints require an `authentication token` provided by your mobile tracking device upon registration. They must be passed in as a parameter for all endpoints as `?auth=XXXXXXX`
`GET /family` - Gets all family profiles. Each family profile contains a `members` object. Sample output:
`GET /family` - Gets all family profiles. Each family profile contains a `member` object.
`POST /family` - Adds a new family. Required: ```@RequestBody:
name - Name of new family.```
`GET /family/{name}` - Get a family by name.
`POST /member/create` - Adds a new family. Required: ``` * @RequestBody requires:
* firstName - First Name of family member.
* lastName - Last Name of family member.
* mobileId - ID of mobile device.```
`GET /member/{firstname}/{lastname}` - Gets a family member by first and last name.
`POST /relationship/{familyid}/{memberid}/{relationship}` - Establish a new relationship between a member and its family. Valid relationships are: `Parent/Mother/Father/Brother/Sister`
`GET /member/{firstname}/{lastname}/location` - Gets current location of a member.
`DELETE /relationship/{familyid}/{memberid}` - Removes a created relationship from a member.
`POST /member/{firstname}/{lastname}` - Register a new member with a mobile device.
`DELETE /member/{id}` - Deletes a member by id. Removes all established relationships of this member as well.
`POST /member/{firstname}/{lastname}/location` - Checks into a new location.
`POST /location` - Records a new location a member is currently at. Will automatically notify the appropriate users about dangerous locations as well as notify parents of their childrens' whereabouts. Required: ```@RequestBody:
* member - The member posting this location.
* x - The X coordinate of the location (latitude).
* y - The Y coordination of the location (longitude).```
`PATCH /member/{firstname}/{lastname}/location` - Update current location statistics.
`POST /knownlocation` - Records a new known location. Required: ```@RequestBody
* name - The name of the location.
* x - The X coordinate of the location (longitude).
* y - The Y coordination of the location (latitude).
* safe - True if safe, false if unsafe location.```
`PATCH /member/{firstname}/{lastname}/type` - Updates a member type. Valid types include `parent`,`user`, and `admin`.
`DELETE /knownlocation/{id}` - Deletes a known location by id.
`DELETE /family/{family}` - Removes a family.
`GET /notification/{memberid}` - Gets the notifications a user has by member id.
`DELETE /family/{family}/member/{firstname}/{lastname}` - Removes family member from a family.
`POST /notification` - Posts a new notification to a user from another user. Required: ```@RequestBody
* fromMember - The ID of the member sending the notification.
* toMember - The ID of the member receiving the notification.
* message - The message.```
`DELETE /notification/{notificationid}` - Deletes a notification by id.