Web API - WilliamNT/tunesynctool GitHub Wiki
[!IMPORTANT]
- Information on this page may be inaccurate or change in the future while the web API is under early development.
- This is NOT something you can use today!
About the tunesynctool web API
In the future, the tunesynctool project will include a self-hostable web UI and API. The latter will serve the former and will also allow third-party developers to easily build upon the features of the tunesynctool package, regardless of their preferred programming language or environment.
The primary goal of the API is to wrap the tunesynctool Python package and simplify connecting your used streaming services. The API communicates via standard HTTP calls with JSON as the payload data format and bearer JWTs for authentication. It also has a full OpenAPI 3 specification included, meaning you can easily play with the various endpoints and even generate SDKs for your own programming language.
Running the API
[!NOTE]
- Currently you have to provide valid credentials for all supported providers via environmental variables. In the future this won't be necessary.
- If your Subsonic instance is available under a sub-path (e.g. "http://hostname/navidrome"), you will run into issues. This is a known issue and will be fixed before the API will be considered stable.
For production use
For production use, a proper Dockerfile and docker-compose.yml file will be added later. For now, follow the development steps but omit the --reload
option from the run command.
Please be aware that the API is not in a stable state at the moment and your data may get lost.
For development
- Clone the repository
- Install all dependencies specified in the requirements.txt file
- Navigate to the webui/api directory
- Assuming everything was installed correctly, run
fastapi run --reload
More details: https://fastapi.tiangolo.com/deployment/manually/#run-the-server-program