Skip to main content
Hi - can I force a ‘Update Music Library’ request via HTTP command?

I want to create a script on my server so when I add songs to my library folder it will send a request to Sonos to update the library.

Thanks
See https://en.community.sonos.com/advanced-setups-229000/update-music-index-from-url-39934 and https://en.community.sonos.com/advanced-setups-229000/simple-script-to-update-music-library-via-linux-23585



I see now that the xml body has been hidden since they migrated to the new forum. I'll update the answer with a correct xml payload when I get the chance.
The XML body should look like this:



code:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:RefreshShareIndex xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<AlbumArtistDisplayOption></AlbumArtistDisplayOption>
</u:RefreshShareIndex>
</s:Body>
</s:Envelope>