-
Notifications
You must be signed in to change notification settings - Fork 6
Endpoint and Data Model Documentation
This document explains the current situation regarding our data models and endpoints. The document will be updated with changes over time.
1. Data Models
1.1.1.1 E-mail
- Name : email
- Type : String
- Required : True
- Unique : True
1.1.1.2. First name
- Name : firstName
- Type : String
- Required : True
- Unique : False
1.1.1.3. Last name
- Name : lastName
- Type : String
- Required : True
- Unique : False
1.1.1.4. Password
- Name : password
- Type : String
- Required : True
- Unique : False Comments:Password is hashed before saving or comparing
- 1.1.2.1. Create : POST /api/auth/signup
- 1.1.2.2. Read : GET /api/users/:id (THIS IS NOT YET MERGED TO MASTER!)
- 1.1.2.3. Update : Not implemented
- 1.1.2.4. Delete : Not implemented
1.2.1.1 Name
- Name : name
- Type : String
- Required : True
- Unique : False
1.2.1.2. Price
- Name : price
- Type : Number
- Required : True
- Unique : False
1.2.1.3. Description
- Name : description
- Type : String
- Required : True
- Unique : False
1.2.1.4. Date
- Name : date
- Type : MongoDB date
- Required : True
- Unique : False
1.2.1.5. Owner
- Name : owner
- Type : String(Mongo object ID)
- Required : True
- Unique : False
1.2.1.6. Artists
- Name : artists
- Type : Array of strings
- Required : False
- Unique : False
1.2.1.7. Users that will attend
- Name : willAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.8. Users that may attend
- Name : maybeAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.9. Users that will/did not attend
- Name : notAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.10. Users that did attend
- Name : attendedUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.11. Blocked users
- Name : blockedUsers
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
- 1.2.2.1. Create : POST /api/events
- 1.2.2.2. Read : GET /api/events/:id or GET /api/events/getEventbyOwner/:id
- 1.2.2.3. Update : GET /api/events/:id
- 1.2.2.4. Delete : DELETE /api/events/:id (THIS IS NOT YET MERGED TO MASTER!)
2. Endpoints
This document explains the current situation regarding our data models and endpoints. The document will be updated with changes over time.1. Data Models
1.1.1.1 E-mail
- Name : email
- Type : String
- Required : True
- Unique : True
1.1.1.2. First name
- Name : firstName
- Type : String
- Required : True
- Unique : False
1.1.1.3. Last name
- Name : lastName
- Type : String
- Required : True
- Unique : False
1.1.1.4. Password
- Name : password
- Type : String
- Required : True
- Unique : False Comments:Password is hashed before saving or comparing
- 1.1.2.1. Create : POST /api/auth/signup
- 1.1.2.2. Read : GET /api/users/:id (THIS IS NOT YET MERGED TO MASTER!)
- 1.1.2.3. Update : Not implemented
- 1.1.2.4. Delete : Not implemented
1.2.1.1 Name
- Name : name
- Type : String
- Required : True
- Unique : False
1.2.1.2. Price
- Name : price
- Type : Number
- Required : True
- Unique : False
1.2.1.3. Description
- Name : description
- Type : String
- Required : True
- Unique : False
1.2.1.4. Date
- Name : date
- Type : MongoDB date
- Required : True
- Unique : False
1.2.1.5. Owner
- Name : owner
- Type : String(Mongo object ID)
- Required : True
- Unique : False
1.2.1.6. Artists
- Name : artists
- Type : Array of strings
- Required : False
- Unique : False
1.2.1.7. Users that will attend
- Name : willAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.8. Users that may attend
- Name : maybeAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.9. Users that will/did not attend
- Name : notAttendUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.10. Users that did attend
- Name : attendedUser
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
1.2.1.11. Blocked users
- Name : blockedUsers
- Type : Array of Mongo object IDs
- Required : False
- Unique : False
- 1.2.2.1. Create : POST /api/events
- 1.2.2.2. Read : GET /api/events/:id or GET /api/events/getEventbyOwner/:id
- 1.2.2.3. Update : GET /api/events/:id
- 1.2.2.4. Delete : DELETE /api/events/:id (THIS IS NOT YET MERGED TO MASTER!)
2. Endpoints
This sections lists the names of the endpoints and their inputs- None
- firstName
- lastName
- password
##2.1.2. POST /api/auth/signin
- None
- password
##2.1.3. GET /api/auth/signout
- None
- None
##2.2.1. GET /api/users/:id (THIS IS NOT YET MERGED WITH MASTER!)
- id
- None
##2.3.1. POST /api/events ###2.3.2.1. URL inputs:
- None ###2.3.2.2. Body inputs:
- name
- price
- owner
- artists
- description
- date
##2.3.2. GET /api/events
- None
- None
##2.3.3. GET /api/events/getEventbyOwner/:id
- id
- None
##2.3.4. GET /api/events/:id
- id
- None
##2.3.5. PUT /api/events/:id ###2.3.5.1. URL inputs:
- id ###2.3.5.2. Body inputs:
- name
- price
- description
- date
- artists
- blokedUsers
##2.3.6. DELETE /api/events/:id (THIS IS NOT YET MERGED WITH MASTER!) ###2.3.6.1 URL inputs:
- id ###2.3.6.2. Body inputs:
- None