Restore from trash
trash_restoreBring an item back from the trash: id is a trash_list entry's id (an artifact's alias or your own bundle's slug works too); the server finds its type. It returns to its folder, workspace and name; a folder or workspace brings back everything that went with it. Needs the same authority as deleting it. why is required for a workspace item. expectedWorkspaceRevision (the entry's workspaceRevision) is optional and refuses (CONFLICT) if it changed since. A file whose folder is still in the trash comes back unfiled; one whose workspace is in the trash is refused (WORKSPACE_DELETED): restore the workspace first. A restored workspace counts toward its owner again, so restoring one is refused WORKSPACE_LIMIT_REACHED when the owner has no room: a team without the Team plan (details.billingUrl is where the person subscribes), or an owner at its maximum (delete a workspace first). Restoring a live item does nothing; an id that names nothing is NOT_FOUND.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The entry's id as the trash list shows it (an artifact's or bundle's id, a folder's or workspace's id); an artifact's alias or your own bundle's slug works too. The server finds its type. | |
| why | No | Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters. | |
| expectedWorkspaceRevision | No | Optional: the entry's workspaceRevision; refuses CONFLICT if the item changed since. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| type | Yes | ||
| unfiled | No | ||
| restored | Yes |