Erasure Requests

Last updated 27 days ago

Version 0.27 adds a read-only preview for inspecting erasure requests. You can view lifecycle status, recorded progress and support guidance. Creating, cancelling, executing and retrying a request still requires assistance from j17. The preview responses carry schema_version: 1 and experimental: true.

For the dashboard, open your instance in the console, choose Production, Staging or Test, then select Erasure. See the dashboard guide.

Authentication and scope

Use an environment-specific API key with read access (read, write or admin). A deploy-only key cannot inspect requests. Each response is scoped to the key's instance and selected environment. For example:

curl 'https://myapp-test.j17.dev/_erasures?limit=20' \
  -H "Authorization: Bearer $TEST_API_KEY"

Production uses https://myapp.j17.dev; staging uses https://myapp-staging.j17.dev. See Authentication.

The console API offers the same read resources at:

https://console.j17.dev/api/instances/{instance_id}/ops/{environment}/erasures

Use a console JWT with the instances scope where token scopes are restricted. The caller must be active and have current owner, admin, developer or viewer access to the instance. Use prod, staging or test for {environment}. The suffixes in the table below apply to both API prefixes.

Endpoints

Method Instance API Response
GET /_erasures Page of requests
GET /_erasures/summary Lifecycle counts and consistency assessment
GET /_erasures/{request_id} Request detail and recorded progress
GET /_erasures/{request_id}/events Page of sanitized lifecycle events

These are inspection endpoints. Mutation requests beneath /_erasures return 405; the preview has no create, cancel, execute or retry action.

Lists and pagination

GET /_erasures accepts these query parameters:

Parameter Meaning
status pending, executing, completed, failed or cancelled
aggregate_type Exact target aggregate type
aggregate_id Exact target aggregate ID
limit Page size, 1–200; default 50
cursor Opaque continuation from the preceding response

Requests are ordered by creation time, newest first, with request ID as the tie-breaker. An example list response:

{
  "ok": true,
  "data": {
    "schema_version": 1,
    "experimental": true,
    "items": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "environment": "test",
        "target": {"aggregate_type": "user", "aggregate_id": "alice"},
        "status": "pending",
        "created_at": "2026-11-04T12:00:00Z",
        "eligible_at": "2026-11-07T12:00:00Z",
        "finished_at": null,
        "allowed_actions": []
      }
    ],
    "next_cursor": null,
    "consistency": {
      "assessment": "unknown",
      "reason_code": "tenant_assessment_not_established",
      "checked_at": null,
      "recommended_action": "observe"
    }
  }
}

Pass a non-null next_cursor back as cursor. Stop when it is null. Keep the same instance, environment, endpoint and filters while paging. Pages are not a snapshot: request status can change between reads.

Summary and assessment

GET /_erasures/summary returns counts_by_status, consistency, recommended_action and an empty allowed_actions array. Counts cover the whole instance/environment, independently of list filters. An unfamiliar lifecycle value contributes to an unknown count instead of a successful state.

The preview emits two consistency assessments:

assessment reason_code Meaning and action
unknown tenant_assessment_not_established No positive consistency assessment is established. Continue observing; this does not mean erasure succeeded.
action_required coordination_inconsistent j17 confirmed a coordination discrepancy for this scope. Contact support with the request ID, if available.

checked_at is a Unix timestamp in seconds, or null, for the latest successful consistency pass. It does not certify complete coverage of your instance. A known issue can remain actionable while a newer check is unavailable.

The preview never reports clear. Assessments can return to unknown when assessment information becomes unavailable; that is not a recovery signal. It provides no durable incident identifiers, alert notifications, webhooks or customer metrics. Poll these authenticated JSON resources if you need inspection; do not interpret unknown as healthy or automate erasure retries from it.

Request detail

GET /_erasures/{request_id} includes the list identity and lifecycle fields plus:

Field Meaning
attempt_id Current recorded execution attempt, or null
progress.plan_state not_created, saved or unavailable
progress.planned_streams Number of streams in the saved scope, or null when unknown
progress.recorded_streams Distinct planned streams with recorded results, or null when unknown
progress.last_progress_at Currently null; the preview does not infer an activity timestamp
failure Safe failure code/message and retryable: false, or null
recommended_action observe or contact_support
allowed_actions Empty in this read-only preview
consistency Request-scoped assessment using the meanings above
evidence Available pre-erasure root and explicit completion boundaries

Lifecycle timestamps are ISO 8601 strings or null. Unknown progress is null, not zero. Recorded progress is not independent verification that all copies of the data have been erased. A failed request should be investigated by support; there is no customer retry action in this release.

The evidence summary carries scope: "saved_event_prefixes", verified: false and exclusions for later_writes, backups, external_copies and unverified_derived_data. It is not a downloadable certificate. See completion and backup boundaries.

Lifecycle history

GET /_erasures/{request_id}/events accepts limit and cursor and returns items plus next_cursor. Events are in recorded order, oldest first. Each item contains:

  • sequence: zero-based position in the request history;
  • event: a safe lifecycle name, such as requested, execution_started, plan_saved, stream_processed, completed, failed or cancelled;
  • occurred_at: recorded Unix timestamp in seconds, or null when unavailable.

The history excludes original event payloads, legal-basis narratives and private failure details. Unknown lifecycle event types appear as updated.

Errors and availability

HTTP status Meaning
401 / 403 Authentication or permission failure
404 Missing request, including one outside your instance or environment
405 Mutation attempted on the read-only instance API
422 Invalid filter, limit or cursor (invalid_erasure_query)
429 Existing instance/IP rate limits apply
503 Erasure information unavailable (erasure_service_unavailable)

A failed read is not an empty request list. Refresh after an unavailable response; contact support for a failed request or an action_required assessment. The console API also returns 503 for an invalid environment value in this preview; use one of the three documented environment names.

Can't find what you need? support@j17.app