Docs
Live demo
DELETE/api/v2/targets/{id}

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/{id} lists accounts_left_on_target and POST /cleanup-tasks/{id}/retry with remove_from_principal_only: true removes the target from Principal only.

Parameters

Path and query1 required of 2
idstringpathrequired

Target ID (UUID)

revoke_managedbooleanquery

When true, revokes all managed roles/RBAC on the target before deleting metadata

default false

Responses

202

Accepted

DeleteTargetResponse · 10 fields
terminalbooleanrequired

Whether this operation has finished.

outcomestring (entity.OperationOutcome)required

Final operation result, or null while the operation is active.

successfailurecancelledpartial
can be null
substatestring (entity.OperationSubstate)required

Qualifies the status and outcome of an operation where they alone would hide what the operator must know. Null when none applies.

rollback_in_progressrolled_backneeds_repairoutcome_unknowninterruptedrequires_approvalholds_lockawaiting_confirmationexpiredtimed_outrescheduled
can be null
cleanup_task_idstring
created_atstring
job_idstring
messagestring

Where a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.

queuedrunningfinished
revoke_skippedstring

Set 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
accounts_leftarray of string

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.

204

No Content

409

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.

↑ ↓ to moveEnter to openEsc to close