Browse the docs

POST /trash/{id}/restore

Puts a deleted macro back into its group.

Details #

Moves the macro out of Recently Deleted and back into the group it was deleted from, as a new saved version in its history. If that group no longer exists the macro goes into the first group by name, and the answer says so in movedFrom.

Returns macro, groupName (where it is now) and, only when the group changed, movedFrom (the name of the group it was deleted from). 404 when nothing in Recently Deleted has that id; 400 when the library has no group at all.

curl -s -X POST -H "Authorization: Bearer $TOKEN" http://127.0.0.1:48080/trash/m_4f2a9c/restore

Parameters #

curl --unix-socket "$SWITCHBOARD_HOME/engine.sock" -X POST http://localhost/trash/{id}/restore

Put a deleted macro back in its group. The Unix socket needs no token; loopback 127.0.0.1:48080 needs Authorization: Bearer <api-token>.

See also #