updateCollection

Updates a collection.

http://your-server/rest/updateCollection

Updates a collection. Only the owner of a collection is allowed to update it. This endpoint must be accessed using an HTTP POST request. Only the fields specified in the request payload will have an effect on a collection.

Request Body

The request payload should be provided in the body as a JSON object.

ParameterReq.OpenS.DefaultComment
collectionIdYesThe collection ID.
nameNoThe human-readable name of the collection.
commentNoThe collection comment.
publicNotrue if the collection should be visible to all users, false otherwise.
addNoAdd the specified items to the collection. The payload is an array of collectionItemID objects. Items are appended to the tail of the collection.
moveNoMove items from the original position to a new one in the collection. The original range is specified by the fromStart (inclusive) and fromEnd (exclusive) positions. The first item in the range moves to the position specified by to
removeNoRemove the items at the specified positions from the collection. The payload is an array of integer indices.

Only one of add, move, and remove can be non-empty in a single request.

Example request

{
  "collectionId": "23785995",
  "name": "new name",
  "comment": "this is a new comment"
}
{
  "collectionId": "23785995",
  "add": [
    {
      "type": "album",
      "id": "1234"
    }
  ]
}
{
  "collectionId": "23785995",
  "move": {
    "fromStart": 0,
    "fromEnd": 5,
    "to": 20
  }
}
{
  "collectionId": "23785995",
  "remove": [0, 1, 2, 6]
}

Result

An empty subsonic-response element on success.

{
  "subsonic-response": {
    "status": "ok",
    "version": "1.16.1",
    "type": "AwesomeServerName",
    "serverVersion": "0.1.3 (tag)",
    "openSubsonic": true
  }
}