# \TrashApi
All URIs are relative to */api*
[**empty_trash**](TrashApi.md#empty_trash) | **POST** /w/{workspace}/trash/empty | permanently delete every item in the workspace trashbin (requires admin privilege)
[**get_trash_item**](TrashApi.md#get_trash_item) | **GET** /w/{workspace}/trash/get/{id} | get a trashed item with the data it was deleted with (requires admin privilege)
[**list_trash**](TrashApi.md#list_trash) | **GET** /w/{workspace}/trash/list | list the workspace trashbin (requires admin privilege)
[**permanently_delete_trash_item**](TrashApi.md#permanently_delete_trash_item) | **DELETE** /w/{workspace}/trash/delete/{id} | permanently delete a trashed item (requires admin privilege)
[**restore_trash_item**](TrashApi.md#restore_trash_item) | **POST** /w/{workspace}/trash/restore/{id} | restore a trashed item to its path (requires admin privilege)
## empty_trash
> String empty_trash(workspace)
permanently delete every item in the workspace trashbin (requires admin privilege)
### Parameters
**workspace** | **String** | | [required] |
### Return type
**String**
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_trash_item
> models::TrashItemWithData get_trash_item(workspace, id)
get a trashed item with the data it was deleted with (requires admin privilege)
### Parameters
**workspace** | **String** | | [required] |
**id** | **i32** | | [required] |
### Return type
[**models::TrashItemWithData**](TrashItemWithData.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_trash
> Vec<models::TrashItem> list_trash(workspace, item_kind, page, per_page)
list the workspace trashbin (requires admin privilege)
### Parameters
**workspace** | **String** | | [required] |
**item_kind** | Option<**String**> | only return items of this kind: script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger | |
**page** | Option<**i32**> | which page to return (starts at 0, default 0) | |
**per_page** | Option<**i32**> | number of items to return for a given page (default 100, max 1000) | |
### Return type
[**Vec<models::TrashItem>**](TrashItem.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## permanently_delete_trash_item
> String permanently_delete_trash_item(workspace, id)
permanently delete a trashed item (requires admin privilege)
### Parameters
**workspace** | **String** | | [required] |
**id** | **i32** | | [required] |
### Return type
**String**
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## restore_trash_item
> String restore_trash_item(workspace, id)
restore a trashed item to its path (requires admin privilege)
### Parameters
**workspace** | **String** | | [required] |
**id** | **i32** | | [required] |
### Return type
**String**
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)