Search Controller Documentation

The SearchController handles searching for tracks, albums, and artists based on various filters and sorting criteria. See the Search Guide for more info about filters and sorting.

Controller Route: /api/search

All routes within the SearchController are prefixed by /api/search.


Summary of Endpoints

Endpoint Method Description Authorization
/api/search/tracks GET Search for tracks based on filters and sorting. Admin, User, Pass
/api/search/albums GET Search for albums based on filters and sorting. Admin, User, Pass
/api/search/artists GET Search for artists based on filters and sorting. Admin, User, Pass

Search Tracks

Search for tracks based on a combination of AND and OR filters, with optional sorting.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-api-url.com/api/search/tracks?page=0&count=50&andFilters=Genre;Eq;Rock&sort=NameAsc" \
             -H "Authorization: Bearer <JWT-token>"
        

Search Albums

Search for albums based on a combination of AND and OR filters, with optional sorting.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-api-url.com/api/search/albums?page=0&count=50&andFilters=Name;Contains;Good&sort=NameAsc" \
             -H "Authorization: Bearer <JWT-token>"
        

Search Artists

Search for artists based on a combination of AND and OR filters, with optional sorting.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-api-url.com/api/search/artists?page=0&count=50&andFilters=PlayCounts;Gt;10&sort=NameAsc" \
             -H "Authorization: Bearer <JWT-token>"