Skip to content

Purge a dataset or tenant through the API: drop its lake and data, revoke its keys #544

Done

Description

@athvin

Open work found in frontend-design.md §7.2 · release post-appexchange · estimate 1.0 eng-weeks

suspend and resume shipped; purge did not. Purge is drop tenant database + delete S3 prefix + key revocation with a grace period.

How this was verified

/v1/orgs/{org}/suspend and /resume exist in the route table; a grep for purge across er-server/src returns nothing.


Coverage, sizing and status were verified against this repo on 2026-11-05, not taken from the doc's checkbox — several docs/ checkboxes are stale in the direction of understating what is built.


Product context (2026-11-26)

Why this matters for the API product: Operate safely, and customer data deletion. A customer building on the API needs a documented way to delete a dataset they created, and an offboarding path that actually removes their data. Today there is none.

Current state: Still true, and the scope has grown since filing because datasets now have their own lakes (dataset_provision creates a catalog, rust/crates/er-server/src/dags/mod.rs:500-510).

  • /v1/orgs/{org} is GET only (rust/crates/er-server/src/lib.rs:14864).
  • /v1/orgs/{org}/datasets/{ds} is GET and PATCH only (lib.rs:14884).
  • Suspend and resume exist for both orgs and datasets.
  • The only "purge" in er-server/src is retention cleanup of audit_log and webhook_delivery (rust/crates/er-server/src/pg.rs:1494).
  • Single-key revocation already exists (DELETE /v1/orgs/{org}/api-keys/{key_id}, lib.rs:14941), so that part is reuse.

The post-appexchange release and the frontend-design.md §7.2 origin are stale framing. The UI is cut, and so is the AppExchange release.

Definition of done:

  • DELETE on a dataset, and an operator purge on an org, each enqueue a job.
  • The job drops the lake catalog and deletes the object-store prefix, after a stated grace period.
  • An org purge revokes all of the org's keys.
  • An audit row is written.
  • The routes are in OpenAPI.
  • A test shows a purged dataset 404s and its prefix is empty.

Dependencies / sequencing: None in the KEEP list.

Open product decision: The grace-period length, and whether a dataset delete is a customer (admin) action or operator-only.

Size: about 1.5 engineer-weeks with dataset scope. The body's 1.0 was tenant-only.

Activity

  1. added
    post-appexchange
    docs-backlog
    post-mvp
    and removed
    post-appexchange
    on Nov 5, 2026
  2. changed the title [-]Tenant purge route[/-] [+]Purge a dataset or tenant through the API: drop its lake and data, revoke its keys[/+] on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs-backlogpost-mvp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions