Running "BackendAPI.exe" will start a HTTP server on http://localhost:63848/ with the following endpoints.
All endpoints described here use text/plain as return type. The return value is wrapped into a json object when an endpoint is prefixed with json/. E.g. If the endpoint GET connection/userid returns exampleuserid the endpoint GET json/connection/userid will return {"result":"exampleuserid"}
The API does need access to the SpotifyAPI. Upon starting the API it will check if a user is already logged in. If no user is logged in it will open a browser window for the user to login. The login for the API is independent of the login for the main app. A user remains logged into the API until the logout endpoint is called.
Open a login page in the default browser.
Logs the current user out.
Returns string: The userid of the currently logged in user. Null if no user is logged in.
Returns array of strings: All available tags.
Returns dictionary of string to array of strings: Taggroups in dictionary form.
Assign a tag to all tracks in an album. tag string: The tag to assign id string: The SpotifyId of the album
Returns array of booleans: A boolean array with a length equivalent to the number of tracks in the album. Each value indicates whether or not the track was successfully tagged. Null if an invalid id was provided.
Remove a tag from all tracks in an album. tag string: The tag to remove id string: The SpotifyId of the album
Returns array of booleans: A boolean array with a length equivalent to the number of tracks in the album. Each value indicates whether or not the tag was successfully removed. Null if an invalid id was provided.
Check if all tracks of the album are tagged with a specific tag. tag string: The tag to check for id string: The SpotifyId of the album
Returns string: "ALL", "SOME" or "NONE"
Assign a tag to all tracks in a playlist. tag string: The tag to assign id string: The SpotifyId of the playlist
Returns array of booleans: A boolean array with a length equivalent to the number of tracks in the playlist. Each value indicates whether or not the track was successfully tagged. Null if an invalid id was provided.
Remove a tag from all tracks in an playlist. tag string: The tag to remove id string: The SpotifyId of the playlist
Returns array of booleans: A boolean array with a length equivalent to the number of tracks in the playlist. Each value indicates whether or not the tag was successfully removed. Null if an invalid id was provided.
Check if all tracks of the playlist are tagged with a specific tag. tag string: The tag to check for. id string: The SpotifyId of the playlist
Returns string: "ALL", "SOME" or "NONE"
Assign a tag to one or many tracks. tag string: The tag to assign id array of strings: SpotifyIds of tracks
Returns array of booleans: A boolean array with a length equivalent to the number of ids. Each value indicates whether or not the track was successfully tagged. If an invalid id is provided, the corresponding success value is false.
Remove a tag from one or many tracks. tag string: The tag to remove id array of strings: SpotifyIds of tracks
Returns array of booleans: A boolean array with a length equivalent to the number of tracks in the playlist. Each value indicates whether or not the tag was successfully removed. If an invalid id is provided, the corresponding success value is false.
Check if all provided tracks are tagged with a specific tag. tag string: The tag to check for id array of strings: SpotifyIds of tracks
Returns string: "ALL", "SOME" or "NONE"