Skip to main content

Delete a group

DELETE 

/groups/:groupName

Deletes a group outright. There is no soft delete, no archive and no undo, and re-creating the same name afterwards produces a new group with a new id.

The one guard is a check for AWS access. If any permission set is assigned to the group, the deletion is refused with a 409 and nothing is removed. List the assignments with GET /groups/{groupName}/assignments, clear each with DELETE /permission-set-assignments/{id}, and retry.

Two things to know before relying on that guard:

  • It counts every permission set assignment recorded against the group, including ones this API will not show you. An assignment whose permission set no longer exists is dropped from GET /groups/{groupName}/assignments but is still counted here, so the 409 can name more assignments than that list contains. A count you cannot reconcile is this, not a bug in your code.
  • It is a check Prism performs before calling the directory, not a constraint the directory enforces, and it depends on Prism's own database being reachable while the request runs. Treat it as a safety net rather than a guarantee.

Deleting the group removes it from the directory together with every membership in it. The members themselves are untouched, but they lose whatever the group was giving them. Prism's own records that reference the group by name are not cleaned up: custom application assignments made to it are left behind, pointing at a group that no longer exists.

The operation is not idempotent: a second DELETE of the same name returns 404. It answers 200 with a body, not 204, and that body echoes the name rather than the deleted group. Fetch the group first if you want a copy of it.

Request​

Responses​

The group was deleted.