diff options
author | Avi Layani <alayani@redhat.com> | 2023-12-13 17:28:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 17:28:31 +0100 |
commit | df24cb692b16103842d00fc4c52806c5e8197db8 (patch) | |
tree | ed3b1b7e6dcccacc48672e14ebc51130b1accb36 /docs | |
parent | Update setuptools-scm (#14716) (diff) | |
download | awx-df24cb692b16103842d00fc4c52806c5e8197db8.tar.xz awx-df24cb692b16103842d00fc4c52806c5e8197db8.zip |
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>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/bulk_api.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/bulk_api.md b/docs/bulk_api.md index 493e9575ba..5fdf94b4e2 100644 --- a/docs/bulk_api.md +++ b/docs/bulk_api.md @@ -3,6 +3,7 @@ Bulk API endpoints allows to perform bulk operations in single web request. There are currently following bulk api actions: - /api/v2/bulk/job_launch - /api/v2/bulk/host_create +- /api/v2/bulk/host_delete Making individual API calls in rapid succession or at high concurrency can overwhelm AWX's ability to serve web requests. When the application's ability to serve is exhausted, clients often receive 504 timeout errors. @@ -99,3 +100,20 @@ Following is an example of a post request at the /api/v2/bulk/host_create: The above will add 6 hosts in the inventory. The maximum number of hosts allowed to be added is controlled by the setting `BULK_HOST_MAX_CREATE`. The default is 100 hosts. Additionally, nginx limits the maximum payload size, which is very likely when posting a large number of hosts in one request with variable data associated with them. The maximum payload size is 1MB unless overridden in your nginx config. + + +## Bulk Host Delete + +Provides feature in the API that allows a single web request to delete multiple hosts from an inventory. + +Following is an example of a post request at the /api/v2/bulk/host_delete: + + + { + "hosts": [3, 4, 5, 6, 7 ,8, 9, 10] + } + + +The above will delete 8 hosts from the inventory. + +The maximum number of hosts allowed to be deleted is controlled by the setting `BULK_HOST_MAX_DELETE`. The default is 250 hosts. Additionally, nginx limits the maximum payload size, which is very likely when posting a large number of hosts in one request with variable data associated with them. The maximum payload size is 1MB unless overridden in your nginx config. |