Delete a target. When revoke_managed=true, queue asynchronous cleanup and keep the target visible/read-only until cleanup completes.
With revoke_managed=true, unconfirmed accounts stay (kept_unconfirmed_accounts). If deletion fails, GET /cleanup-tasks lists accounts_left_on_target and POST /cleanup-tasks with remove_from_principal_only: true removes the target from Principal only.
Parameters
Target ID (UUID)
When true, revokes all managed roles/RBAC on the target before deleting metadata
Responses
Accepted
DeleteTargetResponse · 10 fields
Whether this operation has finished.
Final operation result, or null while the operation is active.
successfailurecancelledpartialQualifies the status and outcome of an operation where they alone would hide what the operator must know. Null when none applies.
rollback_in_progress rolled_back needs_repair outcome_unknown interruptedrequires_approval holds_lock awaiting_confirmation expiredtimed_out rescheduledWhere a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.
queuedrunningfinishedSet when the deleted target was in Observe: Principal deleted it without revoking access, whatever revoke_managed asked for, and the accounts stay on the target.
target_in_observe With revoke_skipped, the full list of accounts Principal managed on the target that stay on it, without a limit. A target with hundreds of accounts lists all of them.
No Content
revoke_managed=true and the last check of the MariaDB target's service account found privileges missing (policy.target_service_account_incomplete. Details.missing_privileges, details.recommended_sql): nothing was revoked and the target stays. A Kubernetes target with applications is not deleted (details.error_code cluster_has_applications). On a cluster in Observe whose application keeps an SSO gate the code is cluster_in_observe: Principal doesn't remove the gate there, the cluster goes back to managed first.
Common errors: 400 401 403 404 429 503 504. They mean the same for every operation, see Errors.