Files
awx/awx/api/templates/api/bulk_host_delete_view.md
Avi Layani df24cb692b Adding hosts bulk deletion feature (#14462)
* Adding hosts bulk deletion feature

Signed-off-by: Avi Layani <alayani@redhat.com>

* fix the type of the argument

Signed-off-by: Avi Layani <alayani@redhat.com>

* fixing activity_entry tracking

Signed-off-by: Avi Layani <alayani@redhat.com>

* Revert "fixing activity_entry tracking"

This reverts commit c8eab52c2ccc5abe215d56d1704ba1157e5fbbd0.
Since the bulk_delete is not related to an inventory, only hosts which
can be from different inventories.

* get only needed vars to reduce memory consumption

Signed-off-by: Avi Layani <alayani@redhat.com>

* filtering the data to reduce memory increase the number of queries

Signed-off-by: Avi Layani <alayani@redhat.com>

* update the activity stream for inventories

Signed-off-by: Avi Layani <alayani@redhat.com>

* fix the changes dict initialiazation

Signed-off-by: Avi Layani <alayani@redhat.com>

---------

Signed-off-by: Avi Layani <alayani@redhat.com>
2023-12-13 10:28:31 -06:00

492 B

Bulk Host Delete

This endpoint allows the client to delete multiple hosts from inventories. They may do this by providing a list of hosts ID's to be deleted.

Example:

{
    "hosts": [1, 2, 3, 4, 5]
}

Return data:

{
    "hosts": {
        "1": "The host a1 was deleted",
        "2": "The host a2 was deleted",
        "3": "The host a3 was deleted",
        "4": "The host a4 was deleted",
        "5": "The host a5 was deleted",
    }
}