Database Controller Documentation

The DatabaseController provides various endpoints for retrieving metadata about the tracks and albums stored in the Melon server's database. This includes retrieving formats, bitrates, sample rates, and more.

Controller Route: /api/db/

All routes within the DatabaseController are prefixed by /api/db/.


Summary of Endpoints

Endpoint Method Description Authorization
/api/db/format GET Retrieves a list of unique track formats. Admin, User, Pass
/api/db/bitrate GET Retrieves a list of unique bitrates. Admin, User, Pass
/api/db/sample-rate GET Retrieves a list of unique sample rates. Admin, User, Pass
/api/db/bits-per-sample GET Retrieves a list of unique bit depths. Admin, User, Pass
/api/db/channel GET Retrieves a list of unique channels. Admin, User, Pass
/api/db/release-status GET Retrieves a list of album release statuses. Admin, User, Pass
/api/db/release-type GET Retrieves a list of album release types. Admin, User, Pass
/api/db/publisher GET Retrieves a list of unique publishers. Admin, User, Pass
/api/db/genres GET Retrieves a list of unique genres. Admin, User, Pass

Get Track Formats

Retrieves a list of unique formats from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/format" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Track Bitrates

Retrieves a list of unique bitrates from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/Bitrates" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Track Sample Rates

Retrieves a list of unique sample rates from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/sample-rate`" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Track Bits Per Sample

Retrieves a list of unique bit depths (bits per sample) from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/bits-per-sample" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Track Channels

Retrieves a list of unique channel configurations (e.g., mono, stereo) from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/channel" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Album Release Statuses

Retrieves a list of unique album release statuses from the albums in the database (e.g., "Released", "Unreleased").

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/release-status" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Album Release Types

Retrieves a list of unique album release types from the albums in the database (e.g., "Album", "Single").

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/release-type" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Album Publishers

Retrieves a list of unique publishers from the albums in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/publisher" \
             -H "Authorization: Bearer <User-JWT>"
        

Get Track Genres

Retrieves a list of unique genres from the tracks in the database.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-melon-server.com/api/db/genres" \
             -H "Authorization: Bearer <User-JWT>"