Removing a tenant

January 10, 2024

ID 199655

Allows you to perform the following actions depending on the tenant type and the specified parameters:

  • For a complete tenant type:
    • Delete information about the tenant and the tenant virtual machines from the Integration Server database.
    • Delete the tenant protection infrastructure deployed from Kaspersky Security Center (virtual Administration Server, account for connecting to it, structure of folders and administration groups, policies, tasks, and installation packages). If there are no other tenants, the Multitenancy KSV LA folder is also deleted.
    • Delete information about the tenant virtual Administration Server from the Integration Server database.

    Calling the tenant removal method does not disable protection on the tenant virtual machines. To disable protection, perform all steps of the tenant removal procedure, including removal of Light Agent for Windows, Light Agent for Linux and Kaspersky Security Center Network Agent from the virtual machines. To suspend protection of the virtual machine for complete tenant type, use the tenant deactivation method.

  • For a simple tenant type: remove the tenant from the Integration Server database.

Method:

DELETE /api/2.0/virtualization/tenants/{tenant ID}?removeTenantArtifacts={true|false}

where:

  • {tenant ID} – tenant identifier in the Integration Server database (required parameter).
  • removeTenantArtifacts={true|false} – optional parameter that determines if to remove the tenant protection infrastructure when removing the tenant from the Integration Server database. Possible values:
    • true – when the tenant is removed, the following actions are performed:
      • Remove the tenant virtual Administration Server.
      • Delete the administrator account of the tenant virtual Administration Server.
      • Delete the Multitenancy KSV LA → <Tenant name> folder and its contents.
      • Delete the Multitenancy KSV LA folder if there are no other tenants.
    • false – only the tenant is deleted from the Integration Server database, the tenant protection infrastructure is not deleted.

The request is executed asynchronously, REST API returns identifier of the DeleteTenant task. Using the task, you can monitor the progress of the tenant deletion procedure. When the task execution completes, the result field displays information about the removed tenant or an error message.

In case of an error at any step of the procedure, all the changes are rolled back.

Return codes:

  • 202 (Accepted) – the request is accepted for execution. The response returns the identifier of the DeleteTenant task.
  • 403 (Forbidden) – access to the resource is denied.

Error codes in the task:

  • VIRMT_TenantWithSpecifiedIdNotFound – the tenant with the specified identifier is not found in the Integration Server database.
  • KSC_ServiceNotConfigured – Kaspersky Security Center connection settings are not specified.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.