settings
Put Salt Route
PUT
/
api
/
admin
/
settings
/
salt
Put Salt Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/salt \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"username": "<string>",
"password": "<string>",
"verify": true
}
'import requests
url = "https://api.example.com/api/admin/settings/salt"
payload = {
"url": "<string>",
"username": "<string>",
"password": "<string>",
"verify": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', username: '<string>', password: '<string>', verify: true})
};
fetch('https://api.example.com/api/admin/settings/salt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/admin/settings/salt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'username' => '<string>',
'password' => '<string>',
'verify' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/admin/settings/salt"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/admin/settings/salt")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/salt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}"
response = http.request(request)
puts response.read_body{
"salt": {
"url": "<string>",
"username": "<string>",
"password_set": true,
"verify": true
},
"pollers": {
"inventory_refresh_minutes": 123,
"inventory_refresh_initial_delay_s": 123,
"fleet_poll_interval_seconds": 123,
"jobs_poll_interval_seconds": 123,
"minion_state_keys_interval_seconds": 123,
"minion_state_presence_interval_seconds": 123,
"minion_state_grains_interval_seconds": 123,
"minion_state_initial_delay_seconds": 123,
"event_stream_enabled": true,
"event_stream_retention_days": 123
},
"widget": {
"widget_hide_dispatch": true,
"widget_hide_routine": true,
"widget_show_jobs": true,
"widget_show_keys": true,
"widget_show_minions": true,
"widget_event_count": 123,
"widget_heartbeat_minutes": 123
},
"logging": {},
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
PUT body for the salt section. All fields optional — only the ones present are applied. At least one must be present.
Response
Successful Response
Salt API connection settings. Password is never returned — only
a boolean password_set so the UI can render "(set)" without
exposing the value.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Put Salt Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/salt \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"username": "<string>",
"password": "<string>",
"verify": true
}
'import requests
url = "https://api.example.com/api/admin/settings/salt"
payload = {
"url": "<string>",
"username": "<string>",
"password": "<string>",
"verify": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', username: '<string>', password: '<string>', verify: true})
};
fetch('https://api.example.com/api/admin/settings/salt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/admin/settings/salt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'username' => '<string>',
'password' => '<string>',
'verify' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/admin/settings/salt"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/admin/settings/salt")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/salt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"verify\": true\n}"
response = http.request(request)
puts response.read_body{
"salt": {
"url": "<string>",
"username": "<string>",
"password_set": true,
"verify": true
},
"pollers": {
"inventory_refresh_minutes": 123,
"inventory_refresh_initial_delay_s": 123,
"fleet_poll_interval_seconds": 123,
"jobs_poll_interval_seconds": 123,
"minion_state_keys_interval_seconds": 123,
"minion_state_presence_interval_seconds": 123,
"minion_state_grains_interval_seconds": 123,
"minion_state_initial_delay_seconds": 123,
"event_stream_enabled": true,
"event_stream_retention_days": 123
},
"widget": {
"widget_hide_dispatch": true,
"widget_hide_routine": true,
"widget_show_jobs": true,
"widget_show_keys": true,
"widget_show_minions": true,
"widget_event_count": 123,
"widget_heartbeat_minutes": 123
},
"logging": {},
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}