Registrar evento de velocidade
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
}Pontuação de Velocidade
Registrar ação de velocidade
Registre uma ação do sujeito e avalie-a em relação à pontuação de anomalias baseada em velocidade. Ingesta automaticamente um sinal de risco quando a pontuação de velocidade atinge 60 ou mais.
POST
/
v1
/
risk
/
velocity
/
record
Registrar evento de velocidade
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
}Registra uma ação para um sujeito e atualiza contadores de janela deslizante em quatro janelas de tempo (1 m, 5 m, 1 h, 24 h). Uma pontuação de velocidade ponderada é calculada a partir das contagens atualizadas. Quando a pontuação atinge 60 ou mais, um sinal de risco com
signal_type: "velocity" é automaticamente ingerido no pipeline de sinal de risco.
Consulte o guia de pontuação de velocidade e anomalia para o fluxo de trabalho completo, modelo de pontuação e padrões de integração.
Pesos de pontuação
| Janela | Peso | Propósito |
|---|---|---|
| 1 minuto | 30 | Detecção de rajadas |
| 5 minutos | 20 | Abuso sustentado de curto prazo |
| 1 hora | 10 | Padrões de médio prazo |
| 24 horas | 5 | Anomalias persistentes |
Resposta
Pontuação de velocidade ponderada (0–100). Pontuações iguais ou superiores a 60 acionam a ingestão automática de sinais.
true se um sinal de risco foi auto-ingerido porque a pontuação de velocidade atingiu 60 ou mais.UUID do sinal de risco ingerido automaticamente (presente apenas quando
signal_ingested é true).
