Resolver anomalía
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Cumplimiento y anomalías
Resolver una anomalía
Marca una anomalía como resuelta con una descripción de la resolución.
POST
/
v1
/
agents
/
{agentId}
/
anomalies
/
{anomalyId}
/
resolve
Resolver anomalía
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/anomalies/{anomalyId}/resolve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Marca la anomalía identificada como resuelta. El ID de la anomalía es un UUID. El controlador actual no consume ningún cuerpo JSON;
resolution y notes no son registrados por este endpoint.
La respuesta contiene status: resolved y anomaly_id. La resolución no restaura, revoca ni cambia automáticamente al agente. Utilice la operación de agente relevante para un cambio de estado autorizado por separado.Parámetros de ruta
Respuesta
200
Anomalía marcada como resuelta; la respuesta contiene el estado y el anomaly_id. No hay restauración automática del agente.

