getAlbumList
Returns a list of random, newest, highest rated etc. albums.
Categories:
http://your-server/rest/getAlbumList
Since 1.2.0
Returns a list of random, newest, highest rated etc. albums. Similar to the album lists on the home page of the Subsonic web interface.
Parameters
Parameter | Req. | OpenS. | Default | Comment |
---|---|---|---|---|
type |
Yes | The list type. Must be one of the following: random , newest , highest , frequent , recent . Since 1.8.0 you can also use alphabeticalByName or alphabeticalByArtist to page through all albums alphabetically, and starred to retrieve starred albums. Since 1.10.1 you can use byYear and byGenre to list albums in a given year range or genre. |
||
size |
No | 10 | The number of albums to return. Max 500. | |
offset |
No | 0 | The list offset. Useful if you for example want to page through the list of newest albums. | |
fromYear |
Yes (if type is byYear ) |
The first year in the range. If fromYear > toYear a reverse chronological list is returned. |
||
toYear |
Yes (if type is byYear ) |
The last year in the range. | ||
genre |
Yes (if type is byGenre ) |
The name of the genre, e.g., “Rock”. | ||
musicFolderId |
No | (Since 1.11.0) Only return albums in the music folder with the given ID. See getMusicFolders . |
Example
http://your-server/rest/getAlbumList.view?type=random&u=demo&p=demo&v=1.13.0&c=AwesomeClientName&f=json
Result
A subsonic-response
element with a nested albumList
element on success.
{
"subsonic-response": {
"status": "ok",
"version": "1.16.1",
"type": "AwesomeServerName",
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"albumList": {
"album": [
{
"id": "200000021",
"parent": "100000036",
"album": "Forget and Remember",
"title": "Forget and Remember",
"name": "Forget and Remember",
"isDir": true,
"coverArt": "al-200000021",
"songCount": 20,
"created": "2021-07-22T02:09:31+00:00",
"duration": 4248,
"playCount": 0,
"artistId": "100000036",
"artist": "Comfort Fit",
"year": 2005,
"genre": "Hip-Hop"
},
{
"id": "200000012",
"parent": "100000019",
"album": "Buried in Nausea",
"title": "Buried in Nausea",
"name": "Buried in Nausea",
"isDir": true,
"coverArt": "al-200000012",
"songCount": 9,
"created": "2021-02-24T01:44:21+00:00",
"duration": 1879,
"playCount": 0,
"artistId": "100000019",
"artist": "Various Artists",
"year": 2012,
"genre": "Punk"
}
]
}
}
}
{
"subsonic-response": {
"status": "ok",
"version": "1.16.1",
"albumList": {
"album": [
{
"id": "200000021",
"parent": "100000036",
"album": "Forget and Remember",
"title": "Forget and Remember",
"name": "Forget and Remember",
"isDir": true,
"coverArt": "al-200000021",
"created": "2021-07-22T02:09:31+00:00",
"duration": 4248,
"playCount": 0,
"artistId": "100000036",
"artist": "Comfort Fit",
"year": 2005,
"genre": "Hip-Hop"
},
{
"id": "200000012",
"parent": "100000019",
"album": "Buried in Nausea",
"title": "Buried in Nausea",
"name": "Buried in Nausea",
"isDir": true,
"coverArt": "al-200000012",
"created": "2021-02-24T01:44:21+00:00",
"duration": 1879,
"playCount": 0,
"artistId": "100000019",
"artist": "Various Artists",
"year": 2012,
"genre": "Punk"
}
]
}
}
}
Field | Type | Req. | OpenS. | Details |
---|---|---|---|---|
albumList |
albumList |
Yes | The album list |
Last modified May 17, 2024: Correct albumList specs (#91) (4a42632)