-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
saphknight edited this page Mar 27, 2019
·
4 revisions
-
GET /
StaticPagesController#root
-
GET /api/users
- returns all users -
GET /api/users/:userId
- returns the user's information and their messages, workspaces, and channels -
POST /api/users
- sign up
-
POST /api/session
- login -
DELETE /api/session
- logout
-
GET /api/workspaces/
- returns all the workspaces -
GET /api/workspaces/:workspaceId
- returns a specific workspace, with channel and user info -
POST /api/workspaces/
- create a workspace -
PATCH /api/worspaces/:workspaceId
- updates a specific workspace
-
GET /api/workspaces/:workspaceId/channels
- returns all the channels in a given workspace -
GET /api/workspaces/:workspaceId/channels/:channelId
- get a specific channel with user info and messages info -
POST /api/workspaces/:workspaceId/channels
- create a new channel in a given workspace -
DELETE /api/workspaces/:workspaceId/channels/:channelId
- delete a specific channel -
PATCH /api/workspaces/:workspaceId/channels/:channelId
- edit a channel
-
GET /api/channels/:channelId/messages
- returns all messages for the specific channel -
POST /api/channels/:channelId/messages
- creates a message in a specific channel -
PATCH /api/channels/:channelId/messages/:messageId
- edit a message -
DELETE /apit/channels/:channelId/messages/:messageId
- deletes a message (check userId)