Restore deleted items
restore_itemsBring back deleted items of one kind from the 30-day recycle bin.
When to use:
Undoing delete_items.
When NOT to use:
Items deleted more than 30 days ago: they are gone and report not found.
What to know:
Whatever used a restored item (playlists, screens) uses it again; a restored screen re-pairs by itself if its device still holds its pairing. Each id reports ok or not found. Needs the kind's delete permission.
Parameters:
kind: the list_items kind name, so a recycle_bin row of kind playlist is restored with kind playlists.
ids: up to 50, from list_items kind recycle_bin. An id that is not in the bin reports "not in the recycle bin"; one deleted over 30 days ago reports not found.
Example: {kind:"playlists", ids:["pl_8f2c"]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Deleted item ids. | |
| kind | Yes | Kind of the ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | The kind that was acted on. | |
| failed | No | How many failed; the rest still ran. | |
| results | No | One row per id or item, in the order given. | |
| succeeded | No | How many ids or items succeeded. |