koel/api-docs/collection.json

1 line
17 KiB
JSON
Raw Normal View History

{"variables":[],"info":{"name":" API","_postman_id":"2371347b-b571-49c0-959a-f6e0b70c94a6","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":"https:\/\/api-docs.koel.dev\/api\/me","method":"POST","header":[{"key":"Accept","value":"application\/json"}],"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":"https:\/\/api-docs.koel.dev\/api\/me","method":"DELETE","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}}]},{"name":"2. Application data","description":"","item":[{"name":"Get application data","request":{"url":"https:\/\/api-docs.koel.dev\/api\/data","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"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":"https:\/\/api-docs.koel.dev\/api\/{song}\/play\/{transcode?}\/{bitrate?}?jwt-token=blanditiis","method":"GET","header":[{"key":"Accept","value":"application\/json"}],"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":"https:\/\/api-docs.koel.dev\/api\/interaction\/play","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"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":"https:\/\/api-docs.koel.dev\/api\/interaction\/like","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"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":"https:\/\/api-docs.koel.dev\/api\/interaction\/batch\/like","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"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