Skip to main content
method
POST
/signal/retract
Authentication: Required (if enabled) Decrements the edge weight between two entities by 1, floored at 0. Use this to correct erroneously ingested signals. Each retraction undoes one POST /signal ingest. The weight is never decremented below 0 — negative weights are architecturally forbidden because strongest_path computes path cost as i64::MAX - weight.

Request Body

{
  "from_entity": 1,
  "to_entity": 2
}
FieldTypeRequiredDescription
from_entityinteger (u64)YesEntity ID of the source node.
to_entityinteger (u64)YesEntity ID of the destination node.

Response

{
  "success": true,
  "new_weight": 4,
  "error": null
}
FieldTypeDescription
successbooleanWhether the retraction was applied.
new_weightinteger or nullUpdated edge weight (floored at 0) if successful.
errorstring or nullError message if failed.
The weight floor is 0, not −1. If you retract more times than you ingested, the weight stays at 0 rather than going negative.

Example

curl -X POST http://localhost:8080/signal/retract \
     -H "Authorization: Bearer your-api-key" \
     -H "Content-Type: application/json" \
     -d '{"from_entity": 1, "to_entity": 2}'
Last modified on February 26, 2026