Skip to content

API Documentation

Minu Kim edited this page Jan 9, 2022 · 2 revisions

API Routes

User Authentication

  • GET /session Restores a session user
  • POST /session Logs in a user
  • DELETE /session Logs out a user

Users

  • GET /users/:userId Returns a user's information.
  • PATCH /users/:userId Updates a user's information.
  • POST /users Creates a new user
  • GET /users/:userId/tracks Returns a user's tracks.
  • GET /users/:userId/comments Returns a user's comments.

Tracks

  • GET /tracks/:trackId Returns a track.
  • POST /tracks Uploads a new track.
  • PUT /tracks/:trackId Updates a track's information.
  • DELETE /tracks/:trackId Deletes a track.
  • GET /tracks/:trackId/comments Returns a track's comments.

Comments

  • POST /comments Uploads a new comment.
  • PUT /comments/:commentId Edits a comment.
  • DELETE /comments/:commentId Deletes a comment.

Clone this wiki locally