Manage Albums and Artists

The CreateDeleteController handles the creation and deletion of albums and artists. These are used primarily for if the scanner produces too many albums or no album due to an issue with track metadata.

Controller Route: /api/

All routes within the CreateDeleteController are prefixed by /api/.


Summary of Endpoints

Endpoint Method Description Authorization
/api/album/create POST Creates a new album. Admin
/api/album/delete POST Deletes an existing album. Admin
/api/artist/create POST Creates a new artist. Admin
/api/artist/delete POST Deletes an existing artist. Admin

Create Album

Creates a new album.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X POST "https://your-melon-server.com/api/album/create" \
             -H "Authorization: Bearer <Admin-JWT>" \
             -d "name=New Album"
        

Delete Album

Deletes an album by its unique identifier.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X POST "https://your-melon-server.com/api/album/delete" \
             -H "Authorization: Bearer <Admin-JWT>" \
             -d "id=612a29ff4f1a2d6f1c1b77aa"
        

Create Artist

Creates a new artist.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X POST "https://your-melon-server.com/api/artist/create" \
             -H "Authorization: Bearer <Admin-JWT>" \
             -d "name=New Artist"
        

Delete Artist

Deletes an artist by its unique identifier.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X POST "https://your-melon-server.com/api/artist/delete" \
             -H "Authorization: Bearer <Admin-JWT>" \
             -d "id=612a2f394f1a2d6f1c1b77ab"
        

Notes: