Enregistrer l'événement de vélocité
curl --request POST \
--url https://api.truthlocks.com/v1/risk/velocity/record \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"action_type": "<string>",
"subject_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_type: '<string>', subject_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/risk/velocity/record', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/velocity/record"
payload = {
"action_type": "<string>",
"subject_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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/velocity/record"
payload := strings.NewReader("{\n \"action_type\": \"<string>\",\n \"subject_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"event_id": "<string>",
"current_count": 123,
"window": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Notation de vélocité
Enregistrer l'action de vélocité
Enregistre une action de sujet et l’évalue par rapport à un score d’anomalie basé sur la vélocité. Ingeste automatiquement un signal de risque lorsque le score de vélocité atteint 60 ou plus.
POST
/
v1
/
risk
/
velocity
/
record
Enregistrer l'événement de vélocité
curl --request POST \
--url https://api.truthlocks.com/v1/risk/velocity/record \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"action_type": "<string>",
"subject_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_type: '<string>', subject_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/risk/velocity/record', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/velocity/record"
payload = {
"action_type": "<string>",
"subject_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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/velocity/record"
payload := strings.NewReader("{\n \"action_type\": \"<string>\",\n \"subject_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"event_id": "<string>",
"current_count": 123,
"window": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Enregistre une action pour un sujet et met à jour les compteurs de fenêtre glissante sur quatre fenêtres temporelles (1 m, 5 m, 1 h, 24 h). Un score de vélocité pondéré est calculé à partir des comptes mis à jour. Lorsque le score atteint 60 ou plus, un signal de risque avec
signal_type: "velocity" est automatiquement ingéré dans le pipeline de signaux de risque.
Consultez le guide de notation de vélocité et d’anomalie pour le flux de travail complet, le modèle de notation et les modèles d’intégration.
Pondérations de notation
| Fenêtre | Poids | Objectif |
|---|---|---|
| 1 minute | 30 | Détection de rafales |
| 5 minutes | 20 | Abus soutenus à court terme |
| 1 heure | 10 | Modèles à moyen terme |
| 24 heures | 5 | Anomalies persistantes |
Réponse
Score de vélocité pondéré (0-100). Les scores égaux ou supérieurs à 60 déclenchent l’ingestion automatique du signal.

