Trash

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.

get/workspaces/{workspace_id}/projects/{project_id}/trash

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_idinteger required

Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.

Example:4
project_idinteger required

Query parameters

typestring[] nullable

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"
]
sortstring

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.

orderstring

asc or desc

limitinteger

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.

offsetinteger

Number of items to skip.

qstring nullable

Substring match on item name (case-insensitive). Empty / whitespace is treated as no filter.

trashed_byinteger[] nullable

Restrict to items trashed by any of these users.

trashed_afterstring date-time nullable

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.

trashed_beforestring date-time nullable

ISO timestamp upper bound on trashed_at (exclusive). Pair with trashed_after for closed-open windows.

expiring_within_daysinteger nullable

Restrict to items whose remaining retention is ≤ N days. Server computes trashed_at <= NOW() - (retention - N) days. Powers the 'Expiring in ≤7 days' filter.

folder_pathstring[] nullable

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.

folder_rootboolean

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

limitinteger required
offsetinteger required
totalinteger required
dataset_countinteger
dataview_countinteger
dashboard_countinteger
automation_countinteger
total_dataset_countinteger
total_dataview_countinteger
total_dashboard_countinteger
total_automation_countinteger
total_size_in_bytesinteger
retention_daysinteger
nextstring nullable

Changes

No recorded changes to this operation across all 4 revisions of this API.