Skip to main content

Module policies

Module policies 

Source
Expand description

Admin API endpoints for policy CRUD, plus catalogs of available plugin types and on-disk scripts. Policy mutations rewrite the in-memory gateway config and trigger validation + graph recompilation via SharedState::reload.

Functionsยง

delete_policy ๐Ÿ”’
DELETE /api/policies/{name} โ€” removes the named policy, then revalidates and recompiles. Returns {"status": "deleted"} on success.
get_policy ๐Ÿ”’
GET /api/policies/{name} โ€” returns the named policy as JSON.
list_plugin_types ๐Ÿ”’
GET /api/plugins โ€” returns the static catalog of node/plugin types (type id + human-readable description) that the UIโ€™s node-graph editor offers in its palette. Always 200 OK.
list_policies ๐Ÿ”’
GET /api/policies โ€” returns all configured policies as a JSON array.
list_scripts ๐Ÿ”’
GET /api/scripts โ€” lists scripted-plugin files found in the plugins/ directory next to the config directory (currently .lua only).
plugin_catalog ๐Ÿ”’
The palette catalog: (type, description) for every registered node type.
router
Builds the router for /api/policies, /api/plugins, and /api/scripts.
update_policy ๐Ÿ”’
PUT /api/policies/{name} โ€” upserts a policy from the JSON body (the path name overrides any name in the body), then revalidates and recompiles all route graphs. Returns {"status": "updated"} on success.