This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Delete datafeeds API
editDelete datafeeds APIedit
Deletes an existing datafeed.
Requestedit
DELETE _ml/datafeeds/<feed_id>
Prerequisitesedit
-
Requires the
manage_ml
cluster privilege. This privilege is included in themachine_learning_admin
built-in role. -
Unless you use the
force
parameter, you must stop the datafeed before you can delete it.
Path parametersedit
-
<feed_id>
- (Required, string) A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters.
Query parametersedit
-
force
- (Optional, Boolean) Use to forcefully delete a started datafeed; this method is quicker than stopping and deleting the datafeed.
Examplesedit
response = client.ml.delete_datafeed( datafeed_id: 'datafeed-total-requests' ) puts response
DELETE _ml/datafeeds/datafeed-total-requests
When the datafeed is deleted, you receive the following results:
{ "acknowledged": true }