List trashed items
Returns dataviews and datasets that are currently in trash. Cascade-trashed children share their parent's cascade_trash_event_id so the FE can group rows for display.
Request
- Base URL: https://app.mammoth.io/api/v2
- URL: https://app.mammoth.io/api/v2/workspaces/{workspace_id}/projects/{project_id}/trash
- Auth: one of:
- HTTP bearer
- API key in header X-API-KEY and API key in header X-API-SECRET and API key in header X-WORKSPACE-ID
Path parameters
Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
Query parameters
Filter the trash listing by one or more resource types. Omit to return all. Allowed values: dataview, dataset, dashboard, automation, and 'data' (the data-library bucket = datasets + their dataviews). Repeat the param to select multiple.
[ "data", "dashboard" ]
Sort by name, trashed_at, or size. The 'expires' UX axis is expressed as trashed_at with asc=soonest / desc=latest, since expires_at = trashed_at + retention is a fixed offset.
asc or desc
Page size, default 50, max 500. Cap is high enough to let the FE fetch everything in one shot for client-side filter/sort mode (toggled via TRASH_USE_SERVER_SIDE in trash.vue) — trash is retention-bounded so 500 covers virtually every project.
Number of items to skip.
Substring match on item name (case-insensitive). Empty / whitespace is treated as no filter.
Restrict to items trashed by any of these users.
ISO timestamp lower bound on trashed_at (inclusive). FE computes from local calendar-day boundaries so 'Today' / 'This week' / 'Older' buckets line up with what the user sees in the row's TRASHED cell. Server treats whatever it receives as UTC.
ISO timestamp upper bound on trashed_at (exclusive). Pair with trashed_after for closed-open windows.
Restrict to items whose remaining retention is ≤ N days. Server computes trashed_at <= NOW() - (retention - N) days. Powers the 'Expiring in ≤7 days' filter.
Restrict the listing to datasets (and their dataviews) whose location-at-trash-time folder chain (trashed_folder_path) equals these names, outermost-first. Matches by name chain so it works even when the original folder has since been deleted. Dashboards and automations are excluded when set — they don't live in folders. Repeat the param to pass each level.
Restrict to datasets (and their dataviews) that were at the project root (Data Library) at trash time — i.e. an empty trashed_folder_path. The root counterpart of folder_path; pass one or the other. Dashboards/automations are excluded when set.
Response
Request fulfilled, document follows
Changes
No recorded changes to this operation across all 4 revisions of this API.