getTrashFolder
FolderContentWrapper getTrashFolder(userIdOrGroupId, filterType, applyFilterOption, count, startIndex, sortBy, sortOrder, filterValue, metadataTemplateId, metadataFilters, includeHiddenMetadata)
GET /api/2.0/files/@trash
Get the Trash section
Returns the caller's Trash section: the files and folders this account has deleted, kept there until they are restored or discarded. Each member has a Trash of their own and sees only what they deleted themselves. Restore an entry by moving it back with PUT api/2.0/files/fileops/move, or discard the whole section with PUT api/2.0/files/fileops/emptytrash; both start a background operation that is polled through GET api/2.0/files/fileops. This call itself modifies nothing, though passing sortBy saves the requested order as the default order for this account. Only the top level of the section is listed, so the contents of a deleted folder are not expanded into it, and filterValue is matched against titles alone here rather than against document content. metadataTemplateId and metadataFilters keep only the deleted entries carrying the template and matching the conditions, the same way GET api/2.0/files/{folderId} does; an unknown template or field, or a malformed condition, is refused with 400. folders and files hold one page of the result, total counts everything that matches before count and startIndex are applied, and current describes the section folder. An account that is given no Trash of its own, an outsider for instance, receives 404.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| userIdOrGroupId | query | UUID (uuid) | Restricts the listing to the entries authored by this portal member, or by the members of this group; the same parameter accepts either kind of identifier. Omit it to list everything the caller can read. | [optional] [example: 00000000-0000-0000-0000-000000000000] |
| filterType | query | FilterType | Narrows the listing to a single kind of entry, such as documents, images or one type of room. Omit it to list every kind the section holds. | [optional] [example: 1] [enum: 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 17, 20, 22, 23, 24, 25, 26] |
| applyFilterOption | query | ApplyFilterOption | Chooses which half of the listing filterType and filterValue are applied to: with Files the folders come back unfiltered, with Folders the files do, and with All both halves are filtered. | [optional] [example: 1] [enum: 0, 1, 2] |
| count | query | Integer (int32) | The size of one page of section content. Pair it with startIndex to walk the listing, and compare the two with total in the response to see when the last page has been read. | [optional] [example: 25] [min: 1] [max: 100] |
| startIndex | query | Integer (int32) | The number of matching entries to skip before the returned page begins; add count to it to ask for the next page. | [optional] [example: 0] |
| sortBy | query | String | The name of the field the entries are ordered by, matched case-insensitively against the file sort fields: DateAndTime, AZ, Size, Author, Type, New, DateAndTimeCreation, RoomType, Tags, Room, CustomOrder, LastOpened and UsedSpace. A recognized value is also saved as the default order of the account and reused by later listings that omit the parameter, while a value matching none of the fields leaves that saved order in place. | [optional] [example: DateAndTime] |
| sortOrder | query | SortOrder | The direction in which the sortBy field is ordered. It is saved together with sortBy as the default order of the account. | [optional] [example: 1] [enum: 0, 1] |
| filterValue | query | String | The search string the section is filtered by, matched as a substring of entry titles. Omit it to list the section unfiltered. | [optional] [example: My Document] |
| metadataTemplateId | query | Integer (int32) | The ID of the metadata template the entries must be assigned to. On its own it narrows the listing to the entries carrying the template; together with the metadata filters it also pins the template the filtered fields belong to. The third-party entries never carry metadata and are left out when the filter is set. | [optional] [example: 1] |
| metadataFilters | query | String | The URL-encoded JSON array of the metadata filter conditions, e.g. [{fieldId:1,op:contains,value:ACME},{fieldId:2,op:range,from:2026-01-01,to:2026-06-30},{fieldId:3,op:in,optionIds:[...]}]. A string field takes eq or contains; a number or a date field takes range with inclusive bounds, or gt, gte, lt, lte with the bound in value; a date-only bound covers the whole day. A custom field is addressed by its name instead of the fieldId: {name:Client,op:eq,value:ACME}. | [optional] [example: [{"fieldId":1,"op":"eq","value":"ACME"}]] |
| includeHiddenMetadata | query | Boolean | Whether the text search, and the metadataMatches it reports, also look at the values of the hidden metadata templates (created with visible false for the metadata a service keeps for itself, which the web client never shows). False, the default, leaves them out, so an entry is not found by such a value; true takes them in. metadataTemplateId and metadataFilters are not concerned: a hidden template or field named there is searched either way. | [optional] [example: false] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The Trash section with one page of the entries the caller deleted | FolderContentWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | A parameter has the wrong type, the count is outside its allowed range, the startIndex is negative, or the metadata filter names an unknown template or field | - | - |
| 403 | The caller is not allowed to read the Trash section | - | - |
| 404 | This account has no Trash section | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: Not defined
- Accept: application/json