feat(api): policy and root CRUD endpoints

Policies and roots were editable only via SQL inside the container.
Full CRUD over both, validated against the vocabulary the policy
engine knows — unknown resolutions or sources answer 422 naming the
field, malformed JSON answers 422, deleting a referenced policy or an
occupied root answers 409. Closes #116 (API half).
This commit is contained in:
Miguel Palhas
2026-08-23 14:56:51 +01:00
parent 951669749b
commit 9fa1f0cc51
17 changed files with 1450 additions and 12 deletions
@@ -0,0 +1,20 @@
{
"db_name": "SQLite",
"query": "SELECT id FROM policies WHERE id = ?",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Integer"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false
]
},
"hash": "fd07d4f50079cc11154a6b1a605b315d3ce220f99dca9a727bb6e4b2eaa45edb"
}