Revocar agente
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/revoke \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/revoke', 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}/revoke"
payload = { "reason": "<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/agents/{agentId}/revoke"
payload := strings.NewReader("{\n \"reason\": \"<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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Agentes de Máquina
Revocar agente
Revocar permanentemente una identidad de agente de máquina, terminando todas las sesiones y bloqueando futuras operaciones
POST
/
v1
/
agents
/
{agentId}
/
revoke
Revocar agente
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/revoke \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/revoke', 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}/revoke"
payload = { "reason": "<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/agents/{agentId}/revoke"
payload := strings.NewReader("{\n \"reason\": \"<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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Revocar Agente
POST /v1/agents/{agentID}/revoke
Revoca permanentemente una identidad de agente de máquina. Esta es una operación irreversible que:
- Establece el estado del agente en
"revoked" - Invalida todas las sesiones activas.
- Bloquea todas las futuras invocaciones de la herramienta
- Impide que el agente se utilice en nuevas delegaciones
La revocación es permanente y no se puede deshacer. Si necesita temporalmente
deshabilitar un agente, use el suspender
endpoint en su lugar. Los agentes revocados
los agentes permanecen en el sistema para fines de auditoría, pero no pueden ser
reactivado.
Autenticación
Requiere el encabezadoX-API-Key o el token Bearer JWT. El espacio de trabajo se deriva de la credencial autenticada; no envíe X-Tenant-ID.
Respuesta
Ejemplo
curl -X POST https://api.truthlocks.com/v1/agents/maip:t1234567:01HYX3KPZQ7RJGBN0WFMV8SDEH/revoke \
-H "X-API-Key: tl_live_..." \
-H "Content-Type: application/json" \
-d '{
"reason": "Agent key compromised. Security incident SI-2026-0412. Replacement agent registered as maip:t1234567:01HYX9NPZS0TMHDO2YHOU0UFGJ."
}'
Cuándo revocar vs. suspender
| Escenario | Acción |
|---|---|
| Comportamiento anómalo detectado, investigación pendiente | Suspender |
| Mantenimiento temporal o cambio de configuración | Suspender |
| Clave de agente confirmada como comprometida | Revocar |
| Agente dado de baja de producción | Revocar |
| El cumplimiento o la retención legal requieren la desactivación permanente | Revocar |
Después de revocar un agente, aún puede ver su historial completo a través de GET
/v1/agents/ punto final.
El registro del agente se retiene indefinidamente para el cumplimiento de auditorías (SOC 2 Tipo II,
ISO 27001).
Respuesta
Agente revocado

