-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Yan Rivera edited this page Oct 25, 2022
·
5 revisions
-
GET /api/users
- returns members of a current channel, workspace, or direct message -
POST /api/users
- sign up
-
POST /api/session
- log in -
DELETE /api/session
- log out
-
GET /api/workspaces
- returns a user's workspaces -
POST /api/workspaces
- creates a workspace -
PATCH /api/workspaces
- edits a workspace -
DELETE /api/workspaces
- delete a workspace (only if current user is the owner/creator)
-
GET /api/messages
- returns messages of a current channel, or direct message -
POST /api/messages
- creates a message -
PATCH /api/messages
- edits a message (only by author) -
DELETE /api/messages
- deletes a message (only by author)
-
GET /api/direct_messages
- returns direct messages of current user in current workspace -
POST /api/direct_messages
- creates a new direct message
-
GET /api/channels
- returns channels of workspace -
POST /api/channels
- creates new channel ( only by admin/owner of workspace) -
PATCH /api/channels
- edits a channel (e.g. name and description. Only by admin/owner)