Update notification configuration
curl --request PUT \
--url http://localhost:9820/api/v1/siloc/notifications/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
"<string>"
],
"expectedVersion": 2,
"windowLeadMinutes": 60
}
'import requests
url = "http://localhost:9820/api/v1/siloc/notifications/config"
payload = {
"channels": ["<string>"],
"expectedVersion": 2,
"windowLeadMinutes": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({channels: ['<string>'], expectedVersion: 2, windowLeadMinutes: 60})
};
fetch('http://localhost:9820/api/v1/siloc/notifications/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9820",
CURLOPT_URL => "http://localhost:9820/api/v1/siloc/notifications/config",
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([
'channels' => [
'<string>'
],
'expectedVersion' => 2,
'windowLeadMinutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:9820/api/v1/siloc/notifications/config"
payload := strings.NewReader("{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:9820/api/v1/siloc/notifications/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9820/api/v1/siloc/notifications/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"channels": [
"<string>"
],
"version": 123,
"windowLeadMinutes": 123
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Update notification configuration
Replaces the notification configuration under optimistic locking; the update applies only if expectedVersion still matches the stored version (else 409).
PUT
/
api
/
v1
/
siloc
/
notifications
/
config
Update notification configuration
curl --request PUT \
--url http://localhost:9820/api/v1/siloc/notifications/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
"<string>"
],
"expectedVersion": 2,
"windowLeadMinutes": 60
}
'import requests
url = "http://localhost:9820/api/v1/siloc/notifications/config"
payload = {
"channels": ["<string>"],
"expectedVersion": 2,
"windowLeadMinutes": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({channels: ['<string>'], expectedVersion: 2, windowLeadMinutes: 60})
};
fetch('http://localhost:9820/api/v1/siloc/notifications/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9820",
CURLOPT_URL => "http://localhost:9820/api/v1/siloc/notifications/config",
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([
'channels' => [
'<string>'
],
'expectedVersion' => 2,
'windowLeadMinutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:9820/api/v1/siloc/notifications/config"
payload := strings.NewReader("{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:9820/api/v1/siloc/notifications/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9820/api/v1/siloc/notifications/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"channels": [
"<string>"
],
"version": 123,
"windowLeadMinutes": 123
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
Enabled channels; non-empty, unique, subset of {WEBHOOK, EMAIL}.
Maximum array length:
20The version last read; the update applies only while it still matches (optimistic lock).
Required range:
x >= 1Lead time (minutes), 1-120.
Required range:
1 <= x <= 120Response
OK
Enabled notification channels (WEBHOOK, EMAIL).
Optimistic-concurrency version; pass as expectedVersion on the next update.
Lead time (minutes) before a deposit-window close at which to fire the alert.
Was this page helpful?
⌘I

