Skip to content
SHAMPOO

Tool catalogue

restore_relations

Write · Ordinary · Knowledge graph

restore_relations

  • Category: knowledge
  • Access: write
  • Audience: ordinary (an ordinary user normally calls this directly)

Purpose

Restore archived relations.

Arguments

Required: relations.

  • relations. Note: Array of {from, to, relationType} identifying rows to restore.

Result

JSON object with restored and already_active counts.

Boundaries

Only addressed rows visible under the caller's project grants are touched; missing or foreign rows are silently skipped. No cascades either direction.

Lifecycle / side effects

Void-to-active revival in place (same id, no duplicates) through the canonical mutation path with ledger events.

Errors

Malformed arguments are rejected. Failures move nothing (atomic).

Example

{
  "relations": [
    {
      "from": "a",
      "relationType": "links",
      "to": "b"
    }
  ]
}

Result shape:

{
  "already_active": 0,
  "restored": 1
}

See also

delete_relations, read_graph.

On this page