mammoth-io Trash API

The Trash API from mammoth-io — 2 operation(s) for trash.

Operations 3

POST /workspaces/{workspace_id}/projects/{project_id}/trash/restore Restore multiple items from Trash #
GET /workspaces/{workspace_id}/projects/{project_id}/trash List trashed items #
POST /workspaces/{workspace_id}/projects/{project_id}/trash Move multiple items to Trash #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mammoth-io:mammoth-io-trash-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mammoth-io-trash-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mammoth Io Trash API
  version: 0.1.0
  contact:
    name: Mammoth Analytics
    url: https://mammoth.io
    email: support@mammoth.io
  description: 'Operations tagged Trash across 2 of this provider''s published API definitions: app.mammoth.io-openapi.json, mammoth-io-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/v2
security:
- bearerAuth: []
- apiKey: []
  apiSecret: []
  workspaceId: []
tags:
- name: Trash
paths:
  /workspaces/{workspace_id}/projects/{project_id}/trash/restore:
    post:
      tags:
      - Trash
      summary: Restore multiple items from Trash
      description: Mirror of /bulk-trash. Datasets are restored first so cascade brings their child views back; dataviews whose dataset was already restored in the same batch are marked succeeded without re-running.
      operationId: BulkRestore
      parameters:
      - name: workspace_id
        in: path
        schema:
          type: integer
          minimum: 1.0
          title: Workspace ID
          description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
          examples:
          - 4
        description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
        required: true
        deprecated: false
        examples:
          workspace_id-example-1:
            summary: Sample workspace ID
            value: 4
      - name: project_id
        in: path
        schema:
          type: integer
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrashBulkRequest'
        required: true
      responses:
        '202':
          description: Trash/restore accepted; returns the tracking job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
    servers:
    - url: /api/v2
  /workspaces/{workspace_id}/projects/{project_id}/trash:
    get:
      tags:
      - Trash
      summary: List trashed items
      description: 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.
      operationId: ListTrash
      parameters:
      - name: workspace_id
        in: path
        schema:
          type: integer
          minimum: 1.0
          title: Workspace ID
          description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
          examples:
          - 4
        description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
        required: true
        deprecated: false
        examples:
          workspace_id-example-1:
            summary: Sample workspace ID
            value: 4
      - name: project_id
        in: path
        schema:
          type: integer
        required: true
        deprecated: false
      - name: type
        in: query
        schema:
          oneOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Resource types
          description: '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.'
          examples:
          - - data
            - dashboard
        description: '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.'
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
        examples:
          type-example-1:
            summary: Datasets + dashboards
            value:
            - data
            - dashboard
      - name: sort
        in: query
        schema:
          type: string
          title: Sort field
          description: 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.
          default: trashed_at
        description: 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.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: order
        in: query
        schema:
          type: string
          title: Sort order
          description: asc or desc
          default: desc
        description: asc or desc
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: limit
        in: query
        schema:
          type: integer
          maximum: 500.0
          minimum: 1.0
          title: Limit
          description: 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.
          default: 50
        description: 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.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0.0
          title: Offset
          description: Number of items to skip.
          default: 0
        description: Number of items to skip.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: q
        in: query
        schema:
          oneOf:
          - type: string
          - type: 'null'
          title: Name search
          description: Substring match on item name (case-insensitive). Empty / whitespace is treated as no filter.
        description: Substring match on item name (case-insensitive). Empty / whitespace is treated as no filter.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: trashed_by
        in: query
        schema:
          oneOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Trashed by user ids
          description: Restrict to items trashed by any of these users.
        description: Restrict to items trashed by any of these users.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: trashed_after
        in: query
        schema:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Trashed after
          description: 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.
        description: 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.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: trashed_before
        in: query
        schema:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Trashed before
          description: ISO timestamp upper bound on trashed_at (exclusive). Pair with trashed_after for closed-open windows.
        description: ISO timestamp upper bound on trashed_at (exclusive). Pair with trashed_after for closed-open windows.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: expiring_within_days
        in: query
        schema:
          oneOf:
          - type: integer
          - type: 'null'
          title: Expiring within (days)
          description: Restrict to items whose remaining retention is ≤ N days. Server computes trashed_at <= NOW() - (retention - N) days. Powers the 'Expiring in ≤7 days' filter.
        description: Restrict to items whose remaining retention is ≤ N days. Server computes trashed_at <= NOW() - (retention - N) days. Powers the 'Expiring in ≤7 days' filter.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: folder_path
        in: query
        schema:
          oneOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Folder path
          description: 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.
        description: 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.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: folder_root
        in: query
        schema:
          type: boolean
          title: Folder root
          description: 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.
          default: false
        description: 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.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrashList'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
    post:
      tags:
      - Trash
      summary: Move multiple items to Trash
      description: 'Accepts a mixed list of {type, id} items (datasets + dataviews) and processes them serially in a single async task. Datasets are trashed first so their cascade handles child views; dataviews whose dataset was already trashed in the same batch are marked succeeded without re-running. Resolved future shape: {succeeded: [...], failed: [...]} per item.'
      operationId: BulkTrash
      parameters:
      - name: workspace_id
        in: path
        schema:
          type: integer
          minimum: 1.0
          title: Workspace ID
          description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
          examples:
          - 4
        description: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
        required: true
        deprecated: false
        examples:
          workspace_id-example-1:
            summary: Sample workspace ID
            value: 4
      - name: project_id
        in: path
        schema:
          type: integer
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrashBulkRequest'
        required: true
      responses:
        '202':
          description: Trash/restore accepted; returns the tracking job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
    servers:
    - url: /api/v2
components:
  schemas:
    JobSchema:
      properties:
        id:
          type: integer
          minimum: 0.0
          title: Job id
          examples:
          - value:
              id: 10
        status:
          type: string
          enum:
          - success
          - failure
          - processing
          - error
          title: Job status
          description: Job status can be success, failure or processing
          examples:
          - value:
              status: success
        response:
          oneOf:
          - type: object
          - type: array
          description: Result of async task is stored in response
          examples:
          - value:
              response:
                object: some object
        last_updated_at:
          type: string
          format: date-time
          title: Job last updated at
          description: Job last updated at is the time when Job status was last updated
          examples:
          - value:
              last_updated_at: '2021-08-10T10:00:00'
        created_at:
          type: string
          format: date-time
          title: Job created at
          description: Create at is time when async task was created
          examples:
          - value:
              created_at: '2021-08-10T10:00:00'
        path:
          type: string
          title: Job path
          description: API request path of the Job operation
          examples:
          - value:
              path: /api/v2/dataviews/1
        operation:
          type: string
          title: Job operation
          description: Operation is async task name which Job is tracking
          examples:
          - value:
              operation: post_modification_pipeline_execution
      type: object
      required:
      - created_at
      - id
      - last_updated_at
      - operation
      - path
      - response
      - status
      title: JobSchema
    TrashBulkRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TrashBulkItem'
          type: array
      type: object
      required:
      - items
      title: TrashBulkRequest
    TrashedByUser:
      properties:
        id:
          type: integer
          title: User id
        name:
          oneOf:
          - type: string
          - type: 'null'
          title: Display name
      type: object
      required:
      - id
      title: TrashedByUser
    JobResponse:
      properties:
        job:
          $ref: '#/components/schemas/JobSchema'
      type: object
      required:
      - job
      title: JobResponse
    TrashBulkItem:
      properties:
        type:
          $ref: '#/components/schemas/TrashItemType'
        id:
          type: integer
      type: object
      required:
      - id
      - type
      title: TrashBulkItem
    TrashItem:
      properties:
        id:
          type: integer
          title: Resource id
        type:
          $ref: '#/components/schemas/TrashItemType'
        name:
          oneOf:
          - type: string
          - type: 'null'
          title: Resource name
        project_id:
          oneOf:
          - type: integer
          - type: 'null'
        dataset_id:
          oneOf:
          - type: integer
          - type: 'null'
          description: Parent dataset id; only present for dataview rows.
        trashed_at:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
        trashed_by:
          oneOf:
          - $ref: '#/components/schemas/TrashedByUser'
          - type: 'null'
          description: Null when the trasher account has been removed.
        days_until_purge:
          oneOf:
          - type: integer
          - type: 'null'
          description: Days remaining before auto-purge. Null when retention is disabled.
        cascade_trash_event_id:
          oneOf:
          - type: string
            format: uuid
          - type: 'null'
        folder_resource_id:
          oneOf:
          - type: integer
          - type: 'null'
          description: Resource id of the folder to route to. Null at project root, or when the original folder was moved/deleted (no intact location).
        original_folder_path:
          items:
            type: string
          type: array
          description: Folder names of the item's location at trash time (outermost-first), from the trashed_folder_path snapshot. Empty at project root.
        task_count:
          oneOf:
          - type: integer
          - type: 'null'
          description: 'For dataview rows: total pipeline tasks + action triggers. Null for dataset rows.'
        additional_info:
          additionalProperties: {}
          type: object
          description: 'Type-specific extra metadata. Dataset: {size_in_bytes, total_size_in_bytes}. Dataview: {size_in_bytes, exports}. Future types add their own keys without schema churn.'
        is_context_match:
          type: boolean
          description: True for parent-dataset rows that didn't match the active filter but were pulled in so the FE can render the cascade-tree grouping (a matching dataview nested under its parent). The FE auto-expands these and shows only the matched children, instead of treating them as direct matches.
          default: false
        is_active_parent:
          type: boolean
          description: 'True for synthetic parent-dataset rows whose dataset is NOT trashed but has trashed child dataviews. Sent so the FE can group standalone-trashed views under their parent for legibility (cleaner than a flat list of orphan view rows each with `· in {parent}` suffix). FE renders these as read-only context: no checkbox, no actions, muted icon.'
          default: false
      type: object
      required:
      - id
      - type
      title: TrashItem
    TrashItemType:
      type: string
      enum:
      - dataview
      - dataset
      - dashboard
      - automation
      title: TrashItemType
    TrashList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TrashItem'
          type: array
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
        dataset_count:
          type: integer
          default: 0
        dataview_count:
          type: integer
          default: 0
        dashboard_count:
          type: integer
          default: 0
        automation_count:
          type: integer
          default: 0
        total_dataset_count:
          type: integer
          default: 0
        total_dataview_count:
          type: integer
          default: 0
        total_dashboard_count:
          type: integer
          default: 0
        total_automation_count:
          type: integer
          default: 0
        total_size_in_bytes:
          type: integer
          default: 0
        retention_days:
          type: integer
          default: 30
        next:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      required:
      - items
      - limit
      - offset
      - total
      title: TrashList
  securitySchemes:
    bearerAuth:
      type: http
      description: 'Primary credential. Authorization: Bearer mm_<token>. The token is issued server-side and shown once at creation.'
      scheme: bearer
    apiKey:
      type: apiKey
      description: Deprecated — use bearerAuth.
      name: X-API-KEY
      in: header
    apiSecret:
      type: apiKey
      description: Deprecated — use bearerAuth.
      name: X-API-SECRET
      in: header
    workspaceId:
      type: apiKey
      description: Required with X-API-KEY and X-API-SECRET. Deprecated with them — use bearerAuth.
      name: X-WORKSPACE-ID
      in: header
x-refined-from:
- app.mammoth.io-openapi.json
- mammoth-io-openapi.json