Preview deleting an organization
/api/v1/organizations/{id}/delete/previewReports what deleting the organization would remove, without deleting it: members, whose memberships end (the first 100 and the total); assignments_removed, every assignment in its tree; nodes_deleted, beneath it; roles, its own roles; invites, the pending invitations revoked, by email; domains, its verified domains; sso_bindings and sso_connections, the connections bound to it and owned by it, by name; machine_clients, by name; and directory, whether its directory connection goes. The same sets the delete removes. People are named only for a reader who may see the Environment's people (people_named: env_identities.view in the Console, and production_identities.access in a production Environment; identity.view for an API key; access administration at the node for a tenant's administrator); anyone else gets the counts and empty lists. Read-only. Send version as If-Match on the delete. Requires the hierarchy.manage permission at the organization. Returns 404 when the id does not name a live organization in this Environment.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Responses
application/json
data *OrganizationDeletePreviewDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/organizations/value/delete/preview" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "organization_id": "string", "version": 0, "people_named": false, "members": { "total": 0, "sample": [ { "id": "string", "first_name": "string", "last_name": "string", "name": "string", "email": "string", "avatar_url": "string" } ] }, "assignments_removed": 0, "nodes_deleted": 0, "roles": [ { "id": "string", "name": "string" } ], "invites": { "total": 0, "names": [ "string" ] }, "domains": [ "string" ], "sso_bindings": [ "string" ], "sso_connections": [ "string" ], "machine_clients": [ "string" ], "directory": false } }
Tell us how we can improve this guide.