Use the getFavorites
command in the favorites
namespace to get the list of Sonos favorites for a household. The player limits the number of Sonos favorites to 70.
Endpoint
GET
1 |
/households/{householdId}/favorites |
Request parameters
This command requires a householdId
to determine the target of the command. See the Control documentation for details.
Response
Returns a favoritesList
object, which is an array of favorite
objects with a version number.
In the event of a failure, returns a globalError
.
favoritesList object
The favoritesList
object consists of the fields described below.
Parameter | Type | Value |
---|---|---|
version |
string | The new version string. Sonos updates this version whenever the Sonos favorites change for the household. Your app can then send a getFavorites command to receive the new list of favorites. |
items |
array | A unique value, generated by the player, for each revision of Sonos favorites. |
Example
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
{ "version" : "1", "items" : [ { "id" : "14", "name" : "2016 VMAs", "description" : "ACME2 Music Playlist", "imageUrl" : "https://images.example.com/image12345", "service" : { "name" : "ACME2" } }, { "id" : "140", "name" : "Behind the Boards: Steve Lilly", "description" : "ACME Music Playlist", "service" : { "name" : "Acme Music" } }, { "id" : "1", "name" : "Cake By The Ocean", "description" : "By DNCE", "imageUrl" : "https://images.example.com/image54321", "service" : { "name" : "ACME2" } }, { "id" : "3", "name" : "WBRU", "description" : "TuneIn Station", "imageUrl" : "http://logos.example.com/logo12345.png", "service" : { "name" : "ACME Radio" } } ] } |