New REST API methods have been introduced to manage deleted items. Deleted items are retained in the trash for 30 days.
Methods
Recently deleted items retain a backup that can be used for restoration. The restored item inherits the ID, storage, and properties of the original item.
Limitations
The restoration process requires a Master token.
There are some limitations when restoring deleted channels. A restored channel will attempt to use the same URI, which may already be in use. If the URI is occupied, the channel will not be restored.
The restoration process is performed under the subaccount to which the item belongs. If the subaccount is fully deleted, you must first restore the subaccount before operating within it.
Supported Item Types
- Devices
- Channels
- Streams
- Plugins
- Calcs
- Groups
- Modems
- Subaccounts
- Webhooks
Examples
Restore all deleted devices:
curl -X POST --header 'Authorization: FlespiToken XXXX' 'https://flespi.io/platform/deleted/origin%3Dgw%2Fdevices%2F*'
Restore a channel with ID 123:
curl -X POST --header 'Authorization: FlespiToken XXXX' 'https://flespi.io/platform/deleted/gw%2Fchannels%2F123/restore'