Album APIs Documentation
The GeneralController
handles getting information about media objects. This documentation covers
the
Albums related endpoints.
Controller Route: /api
All routes within the GeneralController
are prefixed by /api
.
Summary of Endpoints
Endpoint | Method | Description | Authorization |
---|---|---|---|
/api/album |
GET | Fetch the details of a specific album by its ID. | Admin, User, Pass |
/api/albums |
GET | Fetch details of multiple albums using a list of album IDs. | Admin, User, Pass |
/api/album/tracks |
GET | Fetch a paginated list of tracks from a specific album. | Admin, User, Pass |
Get Album Details
Fetch the details of a specific album by its ID.
Details:
- Endpoint:
/api/album
- Method:
GET
- Authorization: JWT (Roles: Admin, User, Pass)
Parameters:
- id (string, required): The ID of the album.
Responses:
- 200 OK: Returns the album details excluding the album art paths.
- 404 Not Found: If the album does not exist.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/album?id=66bc9aadab7ba419497e6a97" \
-H "Authorization: Bearer <JWT-token>"
Get Multiple Albums
Fetch details of multiple albums using a list of album IDs.
Details:
- Endpoint:
/api/albums
- Method:
GET
- Authorization: JWT (Roles: Admin, User, Pass)
Parameters:
- ids (
List<string>
, required): A list of album IDs.
Responses:
- 200 OK: Returns a list of albums with details excluding the album art paths.
- 404 Not Found: If none of the albums exist.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/albums?ids=66bc9aadab7ba419497e6a97&ids=66bc99b8ab7ba419497e21af" \
-H "Authorization: Bearer <JWT-token>"
Get Album Tracks
Fetch a paginated list of tracks from a specific album.
Details:
- Endpoint:
/api/album/tracks
- Method:
GET
- Authorization: JWT (Roles: Admin, User, Pass)
Parameters:
- id (string, required): The ID of the album.
- page (int, optional): The page number of tracks (default is 0).
- count (int, optional): Number of tracks to return (default is 100).
- sort (string, optional): Sorting option for tracks (default is "AlbumPositionAsc").
Responses:
- 200 OK: Returns a list of tracks for the specified album.
- 404 Not Found: If the album does not exist.
Example Request (using curl
):
curl -X GET "https://your-api-url.com/api/album/tracks?id=66bc99b8ab7ba419497e21af&page=<page-number>&count=<count>" \
-H "Authorization: Bearer <JWT-token>"