Delete a trained model alias Generally available; Added in 7.13.0

DELETE /_ml/trained_models/{model_id}/model_aliases/{model_alias}

This API deletes an existing model alias that refers to a trained model. If the model alias is missing or refers to a model other than the one identified by the model_id, this API returns an error.

Required authorization

  • Cluster privileges: manage_ml

Path parameters

  • model_id string Required

    The trained model ID to which the model alias refers.

  • model_alias string Required

    The model alias to delete.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

DELETE /_ml/trained_models/{model_id}/model_aliases/{model_alias}
DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model
resp = client.ml.delete_trained_model_alias(
    model_id="flight-delay-prediction-1574775339910",
    model_alias="flight_delay_model",
)
const response = await client.ml.deleteTrainedModelAlias({
  model_id: "flight-delay-prediction-1574775339910",
  model_alias: "flight_delay_model",
});
response = client.ml.delete_trained_model_alias(
  model_id: "flight-delay-prediction-1574775339910",
  model_alias: "flight_delay_model"
)
$resp = $client->ml()->deleteTrainedModelAlias([
    "model_id" => "flight-delay-prediction-1574775339910",
    "model_alias" => "flight_delay_model",
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model"
Response examples (200)
A successful response when deleting a trained model alias.
{
  "acknowledged": true
}