koel/api-docs/collection.json
2020-04-07 23:41:06 +02:00

1 line
No EOL
17 KiB
JSON

{"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 songs","request":{"url":"https:\/\/api-docs.koel.dev\/api\/interaction\/batch\/unlike","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":"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":"https:\/\/api-docs.koel.dev\/api\/interaction\/recently-played\/{count?}?count=2","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"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's playlists","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Create a new playlist","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Sleepy Songs","type":"text","enabled":true},{"key":"rules","value":[],"type":"text","enabled":true}]},"description":"","response":[]}},{"name":"Rename a playlist","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist\/{playlist}","method":"PUT","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Catchy Songs","type":"text","enabled":true}]},"description":"","response":[]}},{"name":"Delete a playlist","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist\/{playlist}","method":"DELETE","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Replace a playlist's content","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist\/{playlist}\/sync","method":"PUT","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"songs","value":[],"type":"text","enabled":true}]},"description":"Instead of adding or removing songs individually, a playlist's content is replaced entirely with an array of song IDs.","response":[]}},{"name":"Get a playlist's songs","request":{"url":"https:\/\/api-docs.koel.dev\/api\/playlist\/{playlist}\/songs","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}}]},{"name":"5. Media information","description":"","item":[{"name":"Update song information","request":{"url":"https:\/\/api-docs.koel.dev\/api\/songs","method":"PUT","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"songs","value":[],"type":"text","enabled":true},{"key":"data","value":{},"type":"text","enabled":true}]},"description":"","response":[]}},{"name":"Get album's extra information","request":{"url":"https:\/\/api-docs.koel.dev\/api\/album\/{album}\/info","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Get extra information about an album via Last.fm.","response":[]}},{"name":"Get artist's extra information","request":{"url":"https:\/\/api-docs.koel.dev\/api\/artist\/{artist}\/info","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Get extra information about an artist via Last.fm.","response":[]}},{"name":"Get song's extra information","request":{"url":"https:\/\/api-docs.koel.dev\/api\/song\/{song}\/info","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Get a song's extra information. The response of this request is a superset of both corresponding\n`album\/{album}\/info` and `artist\/{artist}\/info` requests, combined with the song's lyrics and related YouTube\nvideos, if applicable. This means you can (and should) cache this information somewhere ;)","response":[]}}]},{"name":"6. Download","description":"","item":[{"name":"Download one or several songs","request":{"url":"https:\/\/api-docs.koel.dev\/api\/download\/songs?songs=cum","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Download a whole album","request":{"url":"https:\/\/api-docs.koel.dev\/api\/download\/album\/{album}","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Download all songs by an artist","request":{"url":"https:\/\/api-docs.koel.dev\/api\/download\/artist\/{artist}","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Don't see why one would need this, really.\nLet's pray to God the user doesn't trigger this on Elvis.","response":[]}},{"name":"Download a whole playlist","request":{"url":"https:\/\/api-docs.koel.dev\/api\/download\/playlist\/{playlist}","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Download all songs favorite'd by the current user","request":{"url":"https:\/\/api-docs.koel.dev\/api\/download\/favorites","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}}]},{"name":"7. User management","description":"","item":[{"name":"Create a new user","request":{"url":"https:\/\/api-docs.koel.dev\/api\/user","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"John Doe","type":"text","enabled":true},{"key":"email","value":"john@doe.com","type":"text","enabled":true},{"key":"password","value":"SoSecureMuchW0w","type":"text","enabled":true}]},"description":"","response":[]}},{"name":"Update a user","request":{"url":"https:\/\/api-docs.koel.dev\/api\/user\/{user}","method":"PUT","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Johny Doe","type":"text","enabled":true},{"key":"email","value":"johny@doe.com","type":"text","enabled":true},{"key":"password","value":"sed","type":"text","enabled":true}]},"description":"","response":[]}},{"name":"Delete a user","request":{"url":"https:\/\/api-docs.koel.dev\/api\/user\/{user}","method":"DELETE","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Get current user's profile","request":{"url":"https:\/\/api-docs.koel.dev\/api\/me","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Update current user's profile","request":{"url":"https:\/\/api-docs.koel.dev\/api\/me","method":"PUT","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Johny Doe","type":"text","enabled":true},{"key":"email","value":"johny@doe.com","type":"text","enabled":true},{"key":"password","value":"inventore","type":"text","enabled":true}]},"description":"","response":[]}}]},{"name":"8. Settings","description":"","item":[{"name":"Save the application settings","request":{"url":"https:\/\/api-docs.koel.dev\/api\/settings","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[{"key":"media_path","value":"\/var\/www\/media\/","type":"text","enabled":true}]},"description":"Save the application settings. Right now there's only one setting to be saved (`media_path`).","response":[]}}]},{"name":"AWS integration","description":"","item":[{"name":"Store a song","request":{"url":"https:\/\/api-docs.koel.dev\/api\/os\/s3\/song","method":"POST","header":[{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Create a new song or update an existing one with data sent from AWS.","response":[]}},{"name":"Remove a song","request":{"url":"https:\/\/api-docs.koel.dev\/api\/os\/s3\/song","method":"DELETE","header":[{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Remove a song whose information matches with data sent from AWS.","response":[]}}]},{"name":"Last.fm integration","description":"","item":[{"name":"Scrobble a song","request":{"url":"https:\/\/api-docs.koel.dev\/api\/{song}\/scrobble\/{timestamp}","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"Create a [Last.fm scrobble entry](https:\/\/www.last.fm\/api\/scrobbling) for a song.","response":[]}},{"name":"Connect to Last.fm","request":{"url":"https:\/\/api-docs.koel.dev\/api\/lastfm\/connect?jwt-token=consequatur","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"[Connect](https:\/\/www.last.fm\/api\/authentication) the current user to Last.fm.\nThis is actually NOT an API request. The application should instead redirect the current user to this route,\nwhich will send them to Last.fm for authentication. After authentication is successful, the user will be\nredirected back to `api\/lastfm\/callback?token=<Last.fm token>`.","response":[]}},{"name":"Set Last.fm session key","request":{"url":"https:\/\/api-docs.koel.dev\/api\/lastfm\/session-key","method":"POST","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[{"key":"key","value":"nulla","type":"text","enabled":true}]},"description":"Set the Last.fm session key for the current user. This call should be made after the user is\n[connected to Last.fm](https:\/\/www.last.fm\/api\/authentication).","response":[]}}]},{"name":"YouTube integration","description":"","item":[{"name":"Search for YouTube videos.","request":{"url":"https:\/\/api-docs.koel.dev\/api\/youtube\/search\/song\/{song}","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[{"key":"pageToken","value":"totam","type":"text","enabled":true}]},"description":"Search YouTube for videos related to a song (using its title and artist name).","response":[]}}]},{"name":"general","description":"","item":[{"name":"Execute GraphQL query.","request":{"url":"https:\/\/api-docs.koel.dev\/graphql","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"https:\/\/api-docs.koel.dev\/graphql-playground","request":{"url":"https:\/\/api-docs.koel.dev\/graphql-playground","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}},{"name":"Authenticate the request for channel access.","request":{"url":"https:\/\/api-docs.koel.dev\/broadcasting\/auth","method":"GET","header":[{"key":"Authorization","value":"Bearer {token}"},{"key":"Accept","value":"application\/json"}],"body":{"mode":"formdata","formdata":[]},"description":"","response":[]}}]}]}