POST /mltk/experiments

POST /mltk/experiments (create)

Create a new experiment.

Description. Create a new experiment. Body is form-encoded (matches Splunk conf endpoint contract).

Required fields (validated against bin/experiment/experiment_schema.json):

  • title (string)
  • type (string, enum): one of predict_numeric_fields, predict_categorical_fields, detect_numeric_outliers, detect_categorical_outliers, forecast_time_series, smart_forecast, smart_outlier_detection, smart_clustering, smart_prediction, cluster_numeric_events.

Optional fields. description, notes, hasSchedule ("0"/"1"), hasAlerts, hasEnabledAlerts, alertIds[], searchStages (JSON-encoded array of stage definitions).

Validation bypass. exp-operation=rename skips the schema validation step.

Example.

curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST 
  --data-urlencode 'title=My Forecast' 
  --data-urlencode 'type=smart_forecast' 
  --data-urlencode 'description=Demo' 
  --data-urlencode 'searchStages=[{"stage":"dataset","search":"index=foo | timechart count"}]' 
  "$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/experiments?output_mode=json"

Press Cmd/Ctrl+K to focus search. Esc to close.

Type to search the portal.