playlists > getPlaylist

Note: Sonos does not currently support this command. Keep an eye on the blog for details.

The getPlaylist command in the playlists namespace retrieves the track information associated with a particular playlist.


Endpoint

POST


Request parameters

This command requires a householdId to determine the target of the command. See the Control documentation for details.

See the table below for descriptions of parameters in the body.

Parameter Type Value
playlistId string The identifier of the playlist. You can find this in the playlistsList object in the getPlaylists response.

Response

This command returns a PlaylistSummary object, which contains an array of PlaylistTrack objects.

In the event of a failure, returns a globalError.


playlistSummary type

The playlistSummary object consists of the fields described below.

Parameter Type Value
id string The identifier of the playlist.
name string The name of the playlist.
type string The item type: “playlist”.
tracks array The individual tracks that make up the playlist. An array of playlistTrack objects.

playlistTrack type

The playlistTrack object consists of the fields described below.

Parameter Type Value
name string The title of the track.
artist string The artist associated with the track.
album string The album associated with the track.

Example

Request

Response