Executing Generated Actions (REST API)
Actions are pre-configured execution steps tied to a resource (e.g., “Deploy via SSH”, “Apply Terraform”).
- GET
/api/actions: Lists all available actions. - POST
/api/actions/:module_id/:action_name: Triggers the compilation of an action. Passing required arguments via JSON payload generates and downloads a.tar.gzarchive containing the executed context, rendered configurations, and amanifest.jsonfor the requested runtime (e.g.,docker,nix,bash).
Async Execution Callbacks
Actions declared with an execution [runtime] can define async callbacks. This is useful for writing execution results back to the graph automatically when the runtime finishes, avoiding the need for continuous polling.
[runtime]
engine = "api"
result_callback = "http://localhost:7600/api/actions/result/{{ execution_id }}"
[[runtime.on_complete]]
target_asset = "certificate"
action = "change"
lookup_by = "{{ input.domain }}"
record = {
status = "active",
pem = "{{ step.finalize.certificate }}"
}