settings
Put Pollers Route
PUT
/
api
/
admin
/
settings
/
pollers
Put Pollers Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/pollers \
--header 'Content-Type: application/json' \
--data '
{
"inventory_refresh_minutes": 720,
"inventory_refresh_initial_delay_s": 1800,
"fleet_poll_interval_seconds": 43200,
"jobs_poll_interval_seconds": 43200,
"minion_state_keys_interval_seconds": 43200,
"minion_state_presence_interval_seconds": 43200,
"minion_state_grains_interval_seconds": 43200,
"minion_state_initial_delay_seconds": 1800,
"event_stream_enabled": true,
"event_stream_retention_days": 183
}
'import requests
url = "https://api.example.com/api/admin/settings/pollers"
payload = {
"inventory_refresh_minutes": 720,
"inventory_refresh_initial_delay_s": 1800,
"fleet_poll_interval_seconds": 43200,
"jobs_poll_interval_seconds": 43200,
"minion_state_keys_interval_seconds": 43200,
"minion_state_presence_interval_seconds": 43200,
"minion_state_grains_interval_seconds": 43200,
"minion_state_initial_delay_seconds": 1800,
"event_stream_enabled": True,
"event_stream_retention_days": 183
}
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({
inventory_refresh_minutes: 720,
inventory_refresh_initial_delay_s: 1800,
fleet_poll_interval_seconds: 43200,
jobs_poll_interval_seconds: 43200,
minion_state_keys_interval_seconds: 43200,
minion_state_presence_interval_seconds: 43200,
minion_state_grains_interval_seconds: 43200,
minion_state_initial_delay_seconds: 1800,
event_stream_enabled: true,
event_stream_retention_days: 183
})
};
fetch('https://api.example.com/api/admin/settings/pollers', 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/pollers",
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([
'inventory_refresh_minutes' => 720,
'inventory_refresh_initial_delay_s' => 1800,
'fleet_poll_interval_seconds' => 43200,
'jobs_poll_interval_seconds' => 43200,
'minion_state_keys_interval_seconds' => 43200,
'minion_state_presence_interval_seconds' => 43200,
'minion_state_grains_interval_seconds' => 43200,
'minion_state_initial_delay_seconds' => 1800,
'event_stream_enabled' => true,
'event_stream_retention_days' => 183
]),
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/pollers"
payload := strings.NewReader("{\n \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\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/pollers")
.header("Content-Type", "application/json")
.body("{\n \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/pollers")
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 \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\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
Required range:
0 <= x <= 1440Required range:
0 <= x <= 3600Required range:
0 <= x <= 86400Required range:
0 <= x <= 86400Required range:
0 <= x <= 86400Required range:
0 <= x <= 86400Required range:
0 <= x <= 86400Required range:
0 <= x <= 3600Required range:
1 <= x <= 365Response
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 Pollers Route
curl --request PUT \
--url https://api.example.com/api/admin/settings/pollers \
--header 'Content-Type: application/json' \
--data '
{
"inventory_refresh_minutes": 720,
"inventory_refresh_initial_delay_s": 1800,
"fleet_poll_interval_seconds": 43200,
"jobs_poll_interval_seconds": 43200,
"minion_state_keys_interval_seconds": 43200,
"minion_state_presence_interval_seconds": 43200,
"minion_state_grains_interval_seconds": 43200,
"minion_state_initial_delay_seconds": 1800,
"event_stream_enabled": true,
"event_stream_retention_days": 183
}
'import requests
url = "https://api.example.com/api/admin/settings/pollers"
payload = {
"inventory_refresh_minutes": 720,
"inventory_refresh_initial_delay_s": 1800,
"fleet_poll_interval_seconds": 43200,
"jobs_poll_interval_seconds": 43200,
"minion_state_keys_interval_seconds": 43200,
"minion_state_presence_interval_seconds": 43200,
"minion_state_grains_interval_seconds": 43200,
"minion_state_initial_delay_seconds": 1800,
"event_stream_enabled": True,
"event_stream_retention_days": 183
}
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({
inventory_refresh_minutes: 720,
inventory_refresh_initial_delay_s: 1800,
fleet_poll_interval_seconds: 43200,
jobs_poll_interval_seconds: 43200,
minion_state_keys_interval_seconds: 43200,
minion_state_presence_interval_seconds: 43200,
minion_state_grains_interval_seconds: 43200,
minion_state_initial_delay_seconds: 1800,
event_stream_enabled: true,
event_stream_retention_days: 183
})
};
fetch('https://api.example.com/api/admin/settings/pollers', 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/pollers",
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([
'inventory_refresh_minutes' => 720,
'inventory_refresh_initial_delay_s' => 1800,
'fleet_poll_interval_seconds' => 43200,
'jobs_poll_interval_seconds' => 43200,
'minion_state_keys_interval_seconds' => 43200,
'minion_state_presence_interval_seconds' => 43200,
'minion_state_grains_interval_seconds' => 43200,
'minion_state_initial_delay_seconds' => 1800,
'event_stream_enabled' => true,
'event_stream_retention_days' => 183
]),
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/pollers"
payload := strings.NewReader("{\n \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\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/pollers")
.header("Content-Type", "application/json")
.body("{\n \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/admin/settings/pollers")
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 \"inventory_refresh_minutes\": 720,\n \"inventory_refresh_initial_delay_s\": 1800,\n \"fleet_poll_interval_seconds\": 43200,\n \"jobs_poll_interval_seconds\": 43200,\n \"minion_state_keys_interval_seconds\": 43200,\n \"minion_state_presence_interval_seconds\": 43200,\n \"minion_state_grains_interval_seconds\": 43200,\n \"minion_state_initial_delay_seconds\": 1800,\n \"event_stream_enabled\": true,\n \"event_stream_retention_days\": 183\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>"
}
]
}