Mettre à jour la configuration des risques
curl --request PUT \
--url https://api.truthlocks.com/v1/risk/config \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"auto_case_threshold": 70,
"auto_block_threshold": 90,
"auto_challenge_threshold": 50
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auto_case_threshold: 70,
auto_block_threshold: 90,
auto_challenge_threshold: 50
})
};
fetch('https://api.truthlocks.com/v1/risk/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/config"
payload = {
"auto_case_threshold": 70,
"auto_block_threshold": 90,
"auto_challenge_threshold": 50
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/risk/config"
payload := strings.NewReader("{\n \"auto_case_threshold\": 70,\n \"auto_block_threshold\": 90,\n \"auto_challenge_threshold\": 50\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"auto_case_threshold": 50,
"auto_block_threshold": 50,
"auto_challenge_threshold": 50,
"email_alerts_enabled": true,
"webhook_alerts_enabled": true,
"siem_format": "json",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Opérations de risque
Mettre à jour les paramètres de risque
Mettre à jour la configuration des risques
PUT
/
v1
/
risk
/
config
Mettre à jour la configuration des risques
curl --request PUT \
--url https://api.truthlocks.com/v1/risk/config \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"auto_case_threshold": 70,
"auto_block_threshold": 90,
"auto_challenge_threshold": 50
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auto_case_threshold: 70,
auto_block_threshold: 90,
auto_challenge_threshold: 50
})
};
fetch('https://api.truthlocks.com/v1/risk/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/config"
payload = {
"auto_case_threshold": 70,
"auto_block_threshold": 90,
"auto_challenge_threshold": 50
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/risk/config"
payload := strings.NewReader("{\n \"auto_case_threshold\": 70,\n \"auto_block_threshold\": 90,\n \"auto_challenge_threshold\": 50\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"auto_case_threshold": 50,
"auto_block_threshold": 50,
"auto_challenge_threshold": 50,
"email_alerts_enabled": true,
"webhook_alerts_enabled": true,
"siem_format": "json",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}N’envoyez que les champs pris en charge affichés dans « Essayer ». Les seuils acceptent des valeurs de 0 à 100. Les valeurs omises conservent leurs paramètres enregistrés, ou utilisent les valeurs par défaut lors de la première sauvegarde. Configurez et testez la livraison réelle séparément des préférences de notification.
Corps
application/json
Réponse
Résultat de l'espace de travail actuel

