-
Notifications
You must be signed in to change notification settings - Fork 1
Server (API)
Steven Abreu edited this page Mar 23, 2019
·
4 revisions
We have a server-side application running which connects to the database. We access the database through a RESTful API.
-
users
GET, POST- get list of all users
- create a new user
-
users/<uid>
GET, PUT- restrict PUT (only admin or own user), don't allow DELETE
- get specific user
- update user profile
-
users/<uid>/usergroups
GET- include links to each usergroup
- get all of user's usergroups (filter by member, owner, invited, requested)
-
users/<uid>/usergroups/<ugid>
GET, PUT, DELETE- get user's specific usergroup
- update user's status for usergroup (invited/member/requested)
- delete user's usergroup (i.e. remove usergroup - only if allowed!)
-
users/<uid>/events
GET- include links to each event
- get all of the user's events (filter by confirmed, requested, invited, organizing)
-
users/<uid>/events/<eid>
GET, PUT, DELETE- get specific event (can be single or recurring single)
- update user's status at event (confirmed, invited)
- remove event from user's events (delete event for user, for everyone if organizer)
-
users/<uid>/products
GET- get all products by the user (as seller)
-
users/<uid>/chats
GET- get all chats with this user (seller of buyer)
-
usergroup
GET, POST- get list of all usergroups
- create new usergroup
-
usergroup/<ugid>
GET, PUT, DELETE- restrict PUT and DELETE
- get specific usergroup
- update existing usergroup (meta data only)
- remove user group
-
usergroup/<ugid>/members
GET, POST- get all members of usergroup
- add new member to the usergroup
-
usergroup/<ugid>/members/<uid>
DELETE- remove member from a usergroup
-
usergroup/<ugid>/owners
GET, POST- get all owners of usergroup
- add new owner to usergroup
-
usergroup/<ugid>/owners/<uid>
DELETE- remove owner from usergroup
-
usergroup/<ugid>/invited
GET, POST- get all invited users of usergroup
- invite new user to usergroup
-
usergroup/<ugid>/invited/<uid>
DELETE- remove invitation of user to usergroup
-
usergroup/<ugid>/requested
GET, POST- get all requested users of usergroup
- add new request to join usergroup
-
usergroup/<ugid>/requested/<uid>
DELETE- remove request to join usergroup
-
prodcats
GET- get all product categories
-
evcats
GET- get all event categories
-
locations
GET- get all locations
-
events
GET, POST- get all events (filter by category, location, time)
- create new event
-
events/<evid>
GET, PUT, DELETE- can be single, recurring single or recurring (?) event
- get specific event
- update existing event
- remove existing event
-
events/<evid>/invited
GET, POST- get users that are invited to the event
- invite user to event
-
events/<evid>/confirmed
GET- get users that are attending event
-
events/<evid>/requested
GET, POST- get users that requested to join event
- request to join event
-
events/<evid>/organizing
GET, POST- get event organizers
- add event organizer
-
products
GET, POST- get all products (filters)
- create new product
-
products/<pid>
GET, PUT, DELETE- get specific product
- update product
- delete product
-
products/<pid>/chats
GET, POST- get all chats regarding product
- create new chat for product
-
chats/<cid>
GET- get specific chat
- messages (probably stored in NoSQL)
- requests (?)
- notifications (invite and request)