Melon Scanner Settings API Documentation
The MelonScannerSettingsController
is responsible for
handling settings related to the scanning and configuration of library
paths. For more info on how the scanner functions, see the
Melon Scanner Architecture docs.
This is apart of the Settings Endpoints, which are scattered across a couple of controllers that group them by similarity.
Controller Route: /api/settings/scanner
All routes within the MelonScannerSettingsController
are
prefixed by /api/settings/scanner
.
Summary of Endpoints
Endpoint | Method | Description | Authorization |
---|---|---|---|
/api/settings/scanner/library-paths |
GET | Fetch the current library paths used by the scanner. | Admin |
/api/settings/scanner/library-paths |
POST | Set or update the library paths used by the scanner. | Admin |
/api/settings/scanner/artist-split-indicators |
GET | Fetch the current artist split indicators. | Admin |
/api/settings/scanner/artist-split-indicators |
POST | Set or update the artist split indicators. | Admin |
/api/settings/scanner/genre-split-indicators |
GET | Fetch the current genre split indicators. | Admin |
/api/settings/scanner/genre-split-indicators |
POST | Set or update the genre split indicators. | Admin |
Fetch Library Paths
Fetch the current library paths used by the Melon Scanner.
Details:
-
Endpoint:
/api/settings/scanner/library-paths
- Method:
GET
- Authorization: JWT (Roles: Admin)
Responses:
- 200 OK: Returns a list of library paths.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/settings/scanner/library-paths" \
-H "Authorization: Bearer <JWT-token>"
Set Library Paths
Set or update the library paths used by the Melon Scanner.
Details:
-
Endpoint:
/api/settings/scanner/library-paths
- Method:
POST
- Authorization: JWT (Roles: Admin)
Body:
-
newLibraryPaths (
List<string>
, required): A list of valid directory paths to be used by the scanner.
Responses:
- 200 OK: Returns success message if paths are updated successfully.
- 400 Bad Request: If any of the provided paths do not exist.
Example Request (using curl
):
curl -X POST "https://your-api-url.com/api/settings/scanner/library-paths" \
-H "Authorization: Bearer <JWT-token>" \
-H "Content-Type: application/json" \
-d '["/path/to/library1", "/path/to/library2"]'
Fetch Artist Split Indicators
Fetch the current artist split indicators used to split artist names in the artist metadata of track files.
Details:
-
Endpoint:
/api/settings/scanner/artist-split-indicators
- Method:
GET
- Authorization: JWT (Roles: Admin)
Responses:
- 200 OK: Returns a list of artist split indicators.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/settings/scanner/artist-split-indicators" \
-H "Authorization: Bearer <JWT-token>"
Set Artist Split Indicators
Set or update the artist split indicators used to split artist names in the artist metadata of track files.
Details:
-
Endpoint:
/api/settings/scanner/artist-split-indicators
- Method:
POST
- Authorization: JWT (Roles: Admin)
Body:
-
indicators (
List<string>
, required): A list of strings to be used as artist split indicators.
Responses:
- 200 OK: Returns success message if indicators are updated successfully.
Example Request (using curl
):
curl -X POST "https://your-api-url.com/api/settings/scanner/artist-split-indicators" \
-H "Authorization: Bearer <JWT-token>" \
-H "Content-Type: application/json" \
-d '["feat.", "&", ",", "/"]'
Fetch Genre Split Indicators
Fetch the current genre split indicators used to split genre names in the artist metadata of track files.
Details:
-
Endpoint:
/api/settings/scanner/genre-split-indicators
- Method:
GET
- Authorization: JWT (Roles: Admin)
Responses:
- 200 OK: Returns a list of genre split indicators.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/settings/scanner/genre-split-indicators" \
-H "Authorization: Bearer <JWT-token>"
Set Genre Split Indicators
Set or update the genre split indicators used to split genre names in the artist metadata of track files.
Details:
-
Endpoint:
/api/settings/scanner/genre-split-indicators
- Method:
POST
- Authorization: JWT (Roles: Admin)
Body:
-
indicators (
List<string>
, required): A list of strings to be used as genre split indicators.
Responses:
- 200 OK: Returns success message if indicators are updated successfully.
Example Request (using curl
):
curl -X POST "https://your-api-url.com/api/settings/scanner/genre-split-indicators" \
-H "Authorization: Bearer <JWT-token>" \
-H "Content-Type: application/json" \
-d '["/", ","]'