Update jobs spaces

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

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Update a list of jobs 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_jobs_spaces
curl \
 --request POST 'https://localhost:5601/api/ml/saved_objects/update_jobs_spaces' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"jobIds":["test-job"],"jobType":"anomaly-detector","spacesToAdd":["default"],"spacesToRemove":["*"]}'
Request examples
{
  "jobIds": [
    "test-job"
  ],
  "jobType": "anomaly-detector",
  "spacesToAdd": [
    "default"
  ],
  "spacesToRemove": [
    "*"
  ]
}
{
  "jobIds": [
    "test-job"
  ],
  "jobType": "data-frame-analytics",
  "spacesToAdd": [
    "default"
  ],
  "spacesToRemove": [
    "*"
  ]
}
Response examples (200)
{
  "test-job": {
    "type": "anomaly-detector",
    "success": true
  }
}
{
  "test-job": {
    "type": "data-frame-analytics",
    "success": true
  }
}