Modify the playlist

Home dev toolbox media-player modify-elements

In this example we will see the route PUT /playlist, wich permits to modify all the properties of the elements of a playlist. It is a very important route and we are going to use it in most of the applications.

The commands in this tutorial are made with curl.


PUT /playlist {"query":{"name":"<ELEMENT_TO_MODIFY>"},"modify":{"$set":{"active": false }}}

Will modify the concerned element to desactivate it. We can use the negation to do the exact inverse :

PUT /playlist {"query":{"$not":{"name":"<ELEMENT_TO_MODIFY>"}},"modify":{"$set":{"active": false }}}

Will desactivate all the element that don’t have the given name.