Sonos Music API > getScrollIndices

Sonos uses getScrollIndices to enable alphabetical scrolling for large collections of metadata. It enables users to scroll through an alphabet to select a letter, which can then initiate a getMetadata request on a collection at a particular index.

The message accepts the collection ID as a single parameter and returns a comma-separated list of letter and index pairs. If a directory does not contain any items of the given letter, the index should refer to the next letter that does contain a valid index. For example, if there is no item starting with the letter ’Q’, but the first item that starts with ‘R’ is at index 75, the entry for ‘Q’ should also contain 75. The sample below shows this. There are no entries after the letter ‘V’.

If you wish to provide this capability for large lists of items, your service must implement getScrollIndices and return canScroll=true in the getMetadata response for any collections that provide scroll indices.

The list of items must be in alphabetical order for Scroll indexes to work.

Request parameter

Name Type Description
id string(128) The ID of the collection.


Name Type Description
result string Comma separated list of letters and indices.

Sample request

Sample response