Undeploy a model

To undeploy a model from memory, use the undeploy operation.

For information about user access for this API, see Model access control considerations.

Path and HTTP methods

  1. POST /_plugins/_ml/models/<model_id>/_undeploy

Example request: Undeploying a model from all ML nodes

  1. POST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_undeploy

copy

Example request: Undeploying specific models from specific nodes

  1. POST /_plugins/_ml/models/_undeploy
  2. {
  3. "node_ids": ["sv7-3CbwQW-4PiIsDOfLxQ"],
  4. "model_ids": ["KDo2ZYQB-v9VEDwdjkZ4"]
  5. }

copy

Example request: Undeploying specific models from all nodes

  1. {
  2. "model_ids": ["KDo2ZYQB-v9VEDwdjkZ4"]
  3. }

copy

Example response

  1. {
  2. "sv7-3CbwQW-4PiIsDOfLxQ" : {
  3. "stats" : {
  4. "KDo2ZYQB-v9VEDwdjkZ4" : "UNDEPLOYED"
  5. }
  6. }
  7. }