settings
Put Widget Route
PUT
/
api
/
admin
/
settings
/
widget
Put Widget Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/widget \
--header 'Content-Type: application/json' \
--data '
{
"widget_hide_dispatch": true,
"widget_hide_routine": true,
"widget_show_jobs": true,
"widget_show_keys": true,
"widget_show_minions": true,
"widget_event_count": 25,
"widget_heartbeat_minutes": 722
}
'import requests
url = "https://api.example.com/api/admin/settings/widget"
payload = {
"widget_hide_dispatch": True,
"widget_hide_routine": True,
"widget_show_jobs": True,
"widget_show_keys": True,
"widget_show_minions": True,
"widget_event_count": 25,
"widget_heartbeat_minutes": 722
}
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({
widget_hide_dispatch: true,
widget_hide_routine: true,
widget_show_jobs: true,
widget_show_keys: true,
widget_show_minions: true,
widget_event_count: 25,
widget_heartbeat_minutes: 722
})
};
fetch('https://api.example.com/api/admin/settings/widget', 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/widget",
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([
'widget_hide_dispatch' => true,
'widget_hide_routine' => true,
'widget_show_jobs' => true,
'widget_show_keys' => true,
'widget_show_minions' => true,
'widget_event_count' => 25,
'widget_heartbeat_minutes' => 722
]),
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/widget"
payload := strings.NewReader("{\n \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\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/widget")
.header("Content-Type", "application/json")
.body("{\n \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/widget")
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 \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\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
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 Widget Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/widget \
--header 'Content-Type: application/json' \
--data '
{
"widget_hide_dispatch": true,
"widget_hide_routine": true,
"widget_show_jobs": true,
"widget_show_keys": true,
"widget_show_minions": true,
"widget_event_count": 25,
"widget_heartbeat_minutes": 722
}
'import requests
url = "https://api.example.com/api/admin/settings/widget"
payload = {
"widget_hide_dispatch": True,
"widget_hide_routine": True,
"widget_show_jobs": True,
"widget_show_keys": True,
"widget_show_minions": True,
"widget_event_count": 25,
"widget_heartbeat_minutes": 722
}
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({
widget_hide_dispatch: true,
widget_hide_routine: true,
widget_show_jobs: true,
widget_show_keys: true,
widget_show_minions: true,
widget_event_count: 25,
widget_heartbeat_minutes: 722
})
};
fetch('https://api.example.com/api/admin/settings/widget', 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/widget",
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([
'widget_hide_dispatch' => true,
'widget_hide_routine' => true,
'widget_show_jobs' => true,
'widget_show_keys' => true,
'widget_show_minions' => true,
'widget_event_count' => 25,
'widget_heartbeat_minutes' => 722
]),
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/widget"
payload := strings.NewReader("{\n \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\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/widget")
.header("Content-Type", "application/json")
.body("{\n \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/widget")
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 \"widget_hide_dispatch\": true,\n \"widget_hide_routine\": true,\n \"widget_show_jobs\": true,\n \"widget_show_keys\": true,\n \"widget_show_minions\": true,\n \"widget_event_count\": 25,\n \"widget_heartbeat_minutes\": 722\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>"
}
]
}