2022-09-02 18:09:13 -04:00
---
layout: default
title: Delete Script
parent: Script APIs
nav_order: 4
---
2023-10-23 10:53:52 -04:00
# Delete script
**Introduced 1.0**
{: .label .label-purple }
2022-09-02 18:09:13 -04:00
Deletes a stored script
2023-10-23 10:53:52 -04:00
## Path parameters
2022-09-02 18:09:13 -04:00
Path parameters are optional.
2022-11-18 15:25:06 -05:00
| Parameter | Data type | Description |
2022-09-02 18:09:13 -04:00
:--- | :--- | :---
| script-id | String | ID of script to delete. |
2023-10-23 10:53:52 -04:00
## Query parameters
2022-09-02 18:09:13 -04:00
2022-11-18 15:25:06 -05:00
| Parameter | Data type | Description |
2022-09-02 18:09:13 -04:00
:--- | :--- | :---
| 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.
2023-02-20 11:34:20 -05:00
#### Example request
2022-09-02 18:09:13 -04:00
The following request deletes the `my-first-script` script:
````json
DELETE _scripts/my-script
````
2023-01-30 17:09:38 -05:00
{% include copy-curl.html %}
2022-09-02 18:09:13 -04:00
2023-02-20 11:34:20 -05:00
#### Example response
2022-09-02 18:09:13 -04:00
The `DELETE _scripts/my-first-script` request returns the following field:
````json
{
"acknowledged" : true
}
````
2022-10-27 12:50:39 -04:00
To determine whether the stored script was successfully deleted, use the [Get stored script ]({{site.url}}{{site.baseurl}}/api-reference/script-apis/get-stored-script/ ) API, passing the script name as the `script` path parameter.
2022-09-02 18:09:13 -04:00
2023-10-23 10:53:52 -04:00
## Response fields
2022-09-02 18:09:13 -04:00
The < HTTP METHOD > < endpoint > request returns the following response fields:
2022-11-18 15:25:06 -05:00
| Field | Data type | Description |
2022-09-02 18:09:13 -04:00
:--- | :--- | :---
| acknowledged | Boolean | Whether the delete script request was received. |