Skip to content

Latest commit

 

History

History
85 lines (85 loc) · 4.98 KB

request-mapping.md

File metadata and controls

85 lines (85 loc) · 4.98 KB

Request mapping


Permit all

  • POST /auth/registration - registration new user
  • POST /auth/login - create access and refresh jwt tokens
  • POST /auth/oauth/google - login user by google authentication
  • GET /auth/refresh - refresh access and refresh tokens
  • GET /images/user/avatar/:username - get user avatar by username
  • GET /images/user/profile-header/:username - get user profile header by username
  • GET /images/song/:username/:name - get song avatar by author and name
  • GET /images/playlist/:username/:name - get playlist avatar by username and name
  • POST /verify/restore-password - send mail with code for restoring the password by email from request
  • GET /users/public/:username - get public user dto
  • GET /users/subscribes/:username - get user subscribes by username
  • GET /users/followers/:username - get user followers by username
  • POST /users/restore-password - change user password
  • GET /songs/info/:username/:name - get song info by author and song name
  • GET /songs/audio/:username/:name - get song audio file by author and song name
  • GET /songs/random/:genre - get random song by genre
  • GET /songs/user-songs/:username - get user songs by username
  • GET /search/songs - search songs by substring order by listens count
  • GET /search/playlists - search playlists by substring
  • GET /search/users - search users by substring order by follower count
  • GET /playlists/info/:username - get user playlists by username

Authenticated

  • POST /users/avatar - change user avatar file
  • POST /users/avatar/url - change user avatar url
  • POST /users/profile-header - change user profile header
  • POST /users/change-password - change authenticated user password
  • POST /users/subscribe/:username - subscribe authenticated user to another user
  • POST /users/unsubscribe/:username - unsubscribe authenticated user to another user
  • PATCH /users/username - change user username
  • PATCH /users/email - change user email
  • PATCH /users/region - change user region
  • PATCH /users/description - change user description
  • GET /users/authenticated - get authenticated user dto
  • GET /users/subscribes - get authenticated user subscribes list
  • GET /users/followers - get authenticated user followers list
  • GET /users/liked - get authenticated user liked songs list
  • GET /users/songs - get authenticated user songs list
  • GET /users/playlists - get authenticated user playlists list
  • GET /users/notifications - get authenticated user notifications list
  • GET /users/last-listened/songs - get authenticated user 15 last listened songs
  • GET /users/last-listened/playlists - get authenticated user 15 last listened playlists
  • GET /users/saved-playlists - get authenticated user saved playlists
  • GET /verify/email - verify user email
  • GET /verify/password - send mail with code for restoring the password
  • POST /verify/artist - send verify artist request
  • GET /songs/:genre - get songs list by genre
  • POST /songs - add new song entity
  • POST /songs/audio/:name - add to song audio file
  • POST /songs/avatar/:name - add avatar to song
  • PATCH /songs/statistic/:username/:name - update song statistic
  • DELETE /songs/:name - remove song by song name
  • POST /liked/:username/:name - add song to authenticated user liked
  • DELETE /liked/:username/:name - remove song from authenticated user liked
  • POST /playlists - create new playlist
  • POST /playlists/avatar/:playlistName - add avatar to playlist
  • POST /playlists/:playlistName/:author/:songName - add song to playlist
  • POST /playlists/:playlistName - add songs list to playlist
  • PATCH /playlists - change playlist name
  • PATCH /playlists/:playlistName - change playlist access modifier
  • DELETE /playlists/:playlistName/:author/:songName - remove song from playlist
  • DELETE /playlists/:playlistName - remove user playlist
  • DELETE /notifications/:id - remove user notification by id
  • POST /reports - send report to entity
  • GET /recommendations - get user recommendations song
  • GET /recommendations/might-like - get songs that the user might like
  • GET /artist-statistic/overall - get overall user songs statistic
  • GET /artist-statistic/popular - get most popular user songs
  • POST /saved-playlists - add playlist to saved
  • DELETE /saved-playlists - remove playlist from saved

For moderators

  • POST /moderator/warning-mail/:username - send to user warning mail
  • PATCH /moderator/active/:username - change user active
  • GET /reports/:type - get report by type
  • PATCH /reports/:id - access report by id
  • DELETE /report/:id - decline report by id

For admins

  • GET /admin/user/:username - get user by username
  • PATCH /admin/user/:username - add to user moderator authority
  • DELETE /admin/user/:username - delete user by username