Batch Delete Tenants Warrant Cloud Only
Delete up to 100 tenants in one API request.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Delete Object endpoint instead.
Endpoint
DELETE /v1/tenants
Parameters
A batch delete request takes a list
of tenant
objects containing the tenantId
.
note
Each batch delete request can delete up to 100 new tenants. Requests containing more than 100 tenant objects will fail.
Batch deletes are atomic operations. If any error (client or server) is encountered during creation, none of the tenants will be deleted. Batch delete requests can therefore be safely retried.
Request
- cURL
- Java
- Node.js
curl "https://api.warrant.dev/v1/tenants" \
-X DELETE \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'[{"tenantId":"new-tenant-1"},{"tenantId":"new-tenant-2"}]'
Tenant[] tenantsToDelete = { new Tenant("new-tenant-1"), new Tenant("new-tenant-2") };
client.deleteTenants(tenantsToDelete);
await warrantClient.Tenant.batchDelete([
{
tenantId: "new-tenant-1",
},
{
tenantId: "new-tenant-2",
},
]);
warrant_token = Warrant::Tenant.batch_delete([
{
tenant_id: "new-tenant-1"
},
{
tenant_id: "new-tenant-2"
},
])
Response
200 OK