Update trained models spaces

View as Markdown
POST /api/ml/saved_objects/update_trained_models_spaces

Spaces method and path for this operation:

post /s/{space_id}/api/ml/saved_objects/update_trained_models_spaces

Refer to Spaces for more information.

Update a list of trained models to add and/or remove them from given spaces.

application/json

Body

Responses

  • 200 application/json

    Indicates a successful call

POST /api/ml/saved_objects/update_trained_models_spaces
curl \
 --request POST 'https://localhost:5601/api/ml/saved_objects/update_trained_models_spaces' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"modelIds":["test-model"],"spacesToAdd":["default"],"spacesToRemove":["*"]}'
Request example
{
  "modelIds": [
    "test-model"
  ],
  "spacesToAdd": [
    "default"
  ],
  "spacesToRemove": [
    "*"
  ]
}
Response examples (200)
{
  "test-model": {
    "type": "anomaly-detector",
    "success": true
  }
}
{
  "test-model": {
    "type": "trained-model\"",
    "success": true
  }
}