Track APIs Documentation

The GeneralController handles getting information about media objects. This documentation covers the Tracks related endpoints.

Controller Route: /api

All routes within the GeneralController are prefixed by /api.


Summary of Endpoints

Endpoint Method Description Authorization
/api/track GET Fetch the details of a specific track by its ID. Admin, User, Pass
/api/tracks POST Fetch details of multiple tracks using a list of track IDs. Admin, User, Pass
/api/track/path GET Fetch the file path of a specific track by its ID. Admin
/api/lyrics GET Fetch the lyrics of a specific track by its ID. Admin, User, Pass

Get Track Details

Fetch the details of a specific track by its ID.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/track?id=66bc99b8ab7ba419497e21af" \
             -H "Authorization: Bearer <JWT-token>"
        

Get Multiple Tracks

Fetch details of multiple tracks using a list of track IDs.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/tracks?ids=66bc9a9cab7ba419497e616c&ids=66bc9aadab7ba419497e7088" \
             -H "Authorization: Bearer <JWT-token>"
        

Get Track Path

Fetch the file path of a specific track by its ID.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/track/path?id=66bc9a9cab7ba419497e616c" \
             -H "Authorization: Bearer <JWT-token>"
        

Get Track Lyrics

Fetch the lyrics of a specific track by its ID.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/lyrics?id=66bc9a9cab7ba419497e616c" \
             -H "Authorization: Bearer <JWT-token>"