Bird
Raised Fist0

Which of the following is the correct syntax to create a machine learning job in Elasticsearch using the REST API?

easy📝 Syntax Q3 of Q15
Elasticsearch - ELK Stack Integration
Which of the following is the correct syntax to create a machine learning job in Elasticsearch using the REST API?
APOST _ml/anomaly_detectors/job_id
BGET _ml/anomaly_detectors/job_id
CDELETE _ml/anomaly_detectors/job_id
DPUT _ml/anomaly_detectors/job_id
Step-by-Step Solution
Solution:
  1. Step 1: Recall REST API method for creating resources

    Creating a new ML job requires the PUT method with the job ID in the URL.
  2. Step 2: Match method to Elasticsearch ML job creation

    Elasticsearch uses PUT _ml/anomaly_detectors/job_id to create a job.
  3. Final Answer:

    PUT _ml/anomaly_detectors/job_id -> Option D
  4. Quick Check:

    Create job = PUT method [OK]
Quick Trick: Use PUT to create ML jobs in Elasticsearch [OK]
Common Mistakes:
MISTAKES
  • Using POST instead of PUT for job creation
  • Confusing GET with creation
  • Using DELETE which removes jobs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes