POST /mltk/container_connection

POST /mltk/container_connection

Upsert a container connection stanza.

Description. Upsert a container connection stanza. Validates name uniqueness within container_type (unless is_edit=true). Auth secrets are encoded into passwords.conf. The api_token field auto-generates a 64-char random token if omitted.

Body (JSON). All fields go under payload. Common fields:

Field Type Notes
container_type "docker"/"kubernetes" Required
connection_name string Required (unique per type unless is_edit)
docker_url string e.g. unix:///var/run/docker.sock or tcp://host:2375
api_token string Auto-generated if missing
jupyter_passwd string Hashed Jupyter password
container_enable_https "true"/"false" Default false
endpoint_hostname / endpoint_hostname_external string Internal / external service hostnames
docker_network string Optional
docker_logging_endpoint_hostname string Splunk HEC host for Docker log driver
docker_logging_splunk_token string HEC token

Kubernetes-specific fields:

Field Notes
auth_mode cert-key, user-token, user-login, aws-iam, service-account
cluster_url Required
cluster_ca, client_cert, client_key For cert-key / user-login
user_token, user_name, user_password For token / login
aws_cluster_name, aws_access_key_id, aws_secret_access_key, aws_region_name For aws-iam
service_account_token For service-account
image_pull_secrets "None" or comma-separated secret names
in_cluster_mode "0"/"1"
namespace k8s namespace, default default
storage_class
service_type ingress/nodeport/loadbalancer
ingress_host_pattern, ingress_annotations (JSON string)
node_port_hostname_internal, node_port_hostname_external

Observability & security (both types):

Field Notes
olly_enabled, olly_otel_endpoint, olly_splunk_access_token, olly_otel_service_name OTel / Splunk Observability
splunk_access_enabled, splunk_access_token, splunk_access_host, splunk_access_port Splunk access token
splunk_hec_enabled, splunk_hec_token, splunk_hec_url Splunk HEC ingest
endpoint_cert_check_hostname, endpoint_cert_filename_or_path TLS validation

Example.

curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST 
  -H "Content-Type: application/json" 
  --data @- "$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/container_connection?output_mode=json" <<'JSON'
{
  "payload": {
    "container_type":            "docker",
    "connection_name":           "local-docker",
    "docker_url":                "unix:///var/run/docker.sock",
    "endpoint_hostname":         "localhost",
    "endpoint_hostname_external":"my-docker.example.com",
    "container_enable_https":    "false",
    "olly_enabled":              "false",
    "splunk_hec_enabled":        "false"
  }
}
JSON

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

Type to search the portal.