createContainer
Sonos uses createContainer
to add a playlist. See Add playlists for details.
Request parameters
Name | Type | Description |
---|---|---|
containerType | string | The container type to add. Currently only supports playlist . |
title | string | The title of the playlist. No maximum length. |
parentId | string(255) | (Optional) ID of the parent folder. If not provided, the playlist should be created at the root playlists node. |
seedId | string(255) | (Optional) ID of the content to be added into the playlist upon creation. This can be a playlist, a track, or an album. If not provided, the action should create an empty playlist. |
Response
Include the response in a createContainerResult
inside a createContainerResponse
element.
Name | Type | Description |
---|---|---|
id | string(255) | The unique id of the newly created playlist. |
updateId | string(255) | Future implementation. Can be used to handle editing collisions and data concurrency validation. |
Sample request
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<createContainer xmlns="http://www.sonos.com/Services/1.1">
<containerType>Playlist</containerType>
<title>Party Rock</title>
<parentId>Folder-1234</parentId>
<seedId>Album-1234</seedId>
</createContainer>
</soap:Body>
</soap:Envelope>
Sample response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<createContainerResponse xmlns="http://www.sonos.com/Services/1.1">
<createContainerResult>
<id>playlist-12345</id>
<updateId />
</createContainerResult>
</createContainerResponse>
</soap:Body>
</soap:Envelope>
Updated over 1 year ago