koel/api-docs/collection.json

1 line
12 KiB
JSON
Raw Normal View History

{"variables":[],"info":{"name":"","_postman_id":"682e0a2f-885e-4548-9afa-16b603709745","description":"","schema":"https:\/\/schema.getpostman.com\/json\/collection\/v2.0.0\/collection.json"},"item":[{"name":"1. Authentication","description":"","item":[{"name":"Log a user in","request":{"url":"http:\/\/localhost\/api\/me","method":"POST","body":{"mode":"formdata","formdata":[{"key":"email","value":"john@doe.com","type":"text","enabled":true},{"key":"password","value":"SoSecureMuchW0w","type":"text","enabled":true}]},"description":"Koel uses [JSON Web Tokens](https:\/\/jwt.io\/) (JWT) for authentication.\nAfter the user has been authenticated, a random \"token\" will be returned.\nThis token should then be saved in a local storage and used as an `Authorization: Bearer` header\nfor consecutive calls.\n\nNotice: The token is valid for a week, after that the user will need to log in again.","response":[]}},{"name":"Log the current user out","request":{"url":"http:\/\/localhost\/api\/me","method":"DELETE","body":{"mode":"formdata","formdata":[]},"description":"","response":[]}}]},{"name":"2. Application data","description":"","item":[{"name":"Get application data","request":{"url":"http:\/\/localhost\/api\/data","method":"GET","body":{"mode":"formdata","formdata":[]},"description":"The big fat call to retrieve a set of application data catered for the current user\n(songs, albums, artists, playlists, interactions, and if the user is an admin, settings as well).\nNaturally, this call should be made right after the user has been logged in, when you need to populate\nthe application's interface with useful information.","response":[]}}]},{"name":"3. Song interactions","description":"","item":[{"name":"Play a song","request":{"url":"http:\/\/localhost\/api\/{song}\/play\/{transcode?}\/{bitrate?}","method":"GET","body":{"mode":"formdata","formdata":[]},"description":"The GET request to play\/stream a song. By default Koel will serve the file as-is, unless it's a FLAC.\nIf the value of `transcode` is truthy, Koel will attempt to transcode the file into `bitRate`kbps using ffmpeg.","response":[]}},{"name":"Increase play count","request":{"url":"http:\/\/localhost\/api\/interaction\/play","method":"POST","body":{"mode":"formdata","formdata":[{"key":"song","value":"0146d01afb742b01f28ab8b556f9a75d","type":"text","enabled":true}]},"description":"Increase a song's play count as the currently authenticated user.\nThis request should be made whenever a song is played.\nAn \"interaction\" record including the song and current user's data will be returned.","response":[]}},{"name":"Like or unlike a song","request":{"url":"http:\/\/localhost\/api\/interaction\/like","method":"POST","body":{"mode":"formdata","formdata":[{"key":"song","value":"0146d01afb742b01f28ab8b556f9a75d","type":"text","enabled":true}]},"description":"An \"interaction\" record including the song and current user's data will be returned.","response":[]}},{"name":"Like multiple songs","request":{"url":"http:\/\/localhost\/api\/interaction\/batch\/like","method":"POST","body":{"mode":"formdata","formdata":[{"key":"songs","value":"[]","type":"text","enabled":true}]},"description":"Like several songs at once, useful for \"batch\" actions. An array of \"interaction\" records containing the song\nand user data will be returned.","response":[]}},{"name":"Unlike multiple songs","request":{"url":"http:\/\/localhost\/api\/interaction\/batch\/unlike","method":"POST","body":{"mode":"formdata","formdata":[{"key":"songs","value":"[]","type":"text","enabled":true}]},"description":"Unlike several songs at once, useful for \"batch\" actions. An array of \"interaction\" records containing the song\nand user data will be returned.","response":[]}},{"name":"Get recently played songs","request":{"url":"http:\/\/localhost\/api\/interaction\/recently-played\/{count?}","method":"GET","body":{"mode":"formdata","formdata":[]},"description":"Get a list of songs recently played by the current user.","response":[]}}]},{"name":"4. Playlist management","description":"","item":[{"name":"Get current user'