Delete script

Deletes a stored script

Path parameters

Path parameters are optional.

ParameterData typeDescription
script-idStringID of script to delete.

Query parameters

ParameterData typeDescription
cluster_manager_timeoutTimeAmount of time to wait for a connection to the cluster manager. Optional, defaults to 30s.
timeoutTimeThe period of time to wait for a response. If a response is not received before the timeout value, the request will be dropped.

Example request

The following request deletes the my-first-script script:

  1. DELETE _scripts/my-script

copy

Example response

The DELETE _scripts/my-first-script request returns the following field:

  1. {
  2. "acknowledged" : true
  3. }

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:

FieldData typeDescription
acknowledgedBooleanWhether the delete script request was received.