Skip to content

Backend Routes

B Salinas edited this page Apr 27, 2021 · 4 revisions

API Endpoints

SoundTrack uses the following API routes to dynamically update the page to create a single-page app-like feel for the user for specific features.

users

  • GET /api/users/:id - returns the users profile information
  • POST /api/users/ - user sign up

songs

  • GET /api/users/:id/albums/:id/songs - returns all songs from an album owned by a user

  • POST /api/users/:id/albums/:id/songs - adds a song to an album owned by the user

  • GET /api/users/:id/albums/:id/songs:id - return a song's information

  • PATCH /api/users/:id/albums/:id/songs:id - edit a song's information

  • DELETE /api/users/:id/albums/:id/songs:id - delete a song

albums

  • GET /api/users/:id/albums/ - returns all albums owned by a user

  • POST /api/users/:id/albums/:id/ - adds an album owned by the user

  • GET /api/users/:id/albums/:id/ - return an album's information (song list, user who created album)

  • PATCH /api/users/:id/albums/:id/ - edit an album's information

  • DELETE /api/users/:id/albums/:id/ - delete an album

session

  • POST /api/session - log in
  • DELETE /api/session - log out

Check out the developer behind this project!

Clone this wiki locally