Skip to main content

TenantTeardownResult

Handle for an async tenant-teardown workflow. The mutation returns immediately; poll tenantTeardownStatus with the workflowId for progress and the per-service outcome.

type TenantTeardownResult {
workflowId: String!
status: String!
tenantId: String!
cleared: [TenantTeardownClearedService!]
finalizeSteps: [TenantTeardownFinalizeStep!]
apiKeysRevoked: Int
orphanedExternals: [TenantTeardownOrphanedExternal!]
finalized: Boolean
failedSteps: Int
}

Fields

TenantTeardownResult.workflowId ● String! non-null scalar

Workflow id for the teardown run.

TenantTeardownResult.status ● String! non-null scalar

Current workflow status (e.g. RUNNING, COMPLETED, FAILED).

TenantTeardownResult.tenantId ● String! non-null scalar

The tenant this run is tearing down.

TenantTeardownResult.cleared ● [TenantTeardownClearedService!] list object

Every service the clear fan-out attempted, with its outcome. Populated once the workflow has completed.

TenantTeardownResult.finalizeSteps ● [TenantTeardownFinalizeStep!] list object

Every finalize step, with its outcome. Populated once the workflow has completed.

TenantTeardownResult.apiKeysRevoked ● Int scalar

API keys revoked by the finalize step. Populated once the workflow has completed.

TenantTeardownResult.orphanedExternals ● [TenantTeardownOrphanedExternal!] list object

APISIX consumers and Keycloak clients the teardown could not remove, and why. Empty on a clean run; anything listed here has to be cleaned up by hand, because the API key it belonged to is already gone.

TenantTeardownResult.finalized ● Boolean scalar

Whether every finalize step landed. False when one failed, and also when a failed clear caused the tenant record and its secret config to be deliberately kept for a re-run — check finalizeSteps for which. Populated once the workflow has completed.

TenantTeardownResult.failedSteps ● Int scalar

How many steps failed across the whole run — clears and finalize steps together. Zero means the tenant is fully gone; anything higher means a re-run is needed, since every step is idempotent.

Returned By

tenantTeardownInitiate mutation ● tenantTeardownStatus query