* Add script documentation. Signed-off-by: Steve Murphy <[email protected]> * Use my own example script insteady of Elastic's. Signed-off-by: Steve Murphy <[email protected]> * edditing and format changes. verified API requests and scripts. various corrections Signed-off-by: ariamarble <[email protected]> * made a couple of suggested changes Signed-off-by: ariamarble <[email protected]> * made further corrections Signed-off-by: ariamarble <[email protected]> Signed-off-by: Steve Murphy <[email protected]> Signed-off-by: ariamarble <[email protected]> Co-authored-by: Steve Murphy <[email protected]>
1.4 KiB
1.4 KiB
layout, title, parent, grand_parent, nav_order
| layout | title | parent | grand_parent | nav_order |
|---|---|---|---|---|
| default | Delete Script | Script APIs | REST API reference | 4 |
Delete script
Deletes a stored script
Path parameters
Path parameters are optional.
| Parameter | Data Type | Description |
|---|---|---|
| script-id | String | ID of script to delete. |
Query parameters
| Parameter | Data Type | Description |
|---|---|---|
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Optional, defaults to 30s. |
| timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request will be dropped. |
Sample request
The following request deletes the my-first-script script:
DELETE _scripts/my-script
Sample response
The DELETE _scripts/my-first-script request returns the following field:
{
"acknowledged" : true
}
To determine whether the stored script was successfully deleted, use the Get stored script API, passing the script name as the script path parameter.
Response fields
The request returns the following response fields:
| Field | Data Type | Description |
|---|---|---|
| acknowledged | Boolean | Whether the delete script request was received. |