/action endpoint lets you call any action listed in an application’s state schema. NSP dispatches the call directly through the runtime probe for the target process. The response includes an optional post-action verification result and a state delta so you know exactly what changed.
Endpoint
Request Fields
OS process ID of the target application. Provide either
pid or app_id — the daemon resolves the other automatically.Stable app identifier from
GET /apps. Provide either app_id or pid.Name of the action to execute, exactly as it appears in the
actions map returned by GET /state or GET /schema.Key-value map of action parameters matching the action’s schema. Required parameters must be present; omitting optional parameters is allowed.
A JavaScript-style predicate evaluated against the post-action state, e.g.
"inbox.sent_count > 0". Required for actions with reversibility: "irreversible_write". The daemon polls until the expression evaluates to true or verify_timeout_ms elapses. Maximum 2048 bytes.How long to wait (in milliseconds) for
verify_expression to become true. Accepted range: 100–30000 ms.When
true, the daemon captures a fresh state snapshot before dispatching the action. Use this if you need pre-action state in state_delta to reflect the very latest runtime values rather than the cached snapshot.Response Fields
true if the action ran and — when a verify_expression was provided — the verification passed. false in all other cases.UUIDv7 unique identifier for this execution. Use this for logging and correlation.
The action name that was executed.
Whether the action itself was dispatched. This can be
false if the action was rejected at the pre-flight safety gate before dispatch (e.g., missing verify_expression for an irreversible write).The runtime used for execution (
v8, jvm, clr, or native).Total wall time in milliseconds from receipt of the request to sending the response.
Human-readable status summary, e.g.
"Action executed successfully" or "Verification failed after 5000ms".Post-action verification result. Present only when a
verify_expression was provided.Full state snapshot captured after the action. Useful when you want the current state in one round-trip without a separate
GET /state call.Field-level before/after diff of changed keys, e.g.
{ "inbox.sent_count": { "before": 14, "after": 15 } }.The raw return value from the method invocation. Populated for JVM and CLR runtime actions;
null for V8 browser actions.Action Safety Gates
NSP enforces three safety checks before dispatching any action: 1. Irreversible Write Gate — Actions withreversibility: "irreversible_write" (such as send_reply or delete_email) require a verify_expression. Requests without one are rejected with 400 missing_verify_expression.
2. Dangerous Name Heuristic — If the PID cannot be resolved and the action name contains any of delete, destroy, purge, wipe, reset, clear_all, terminate, shutdown, or kill, the request is rejected with 400 dangerous_action_unverified.
3. Expression Size Limit — verify_expression is capped at 2048 bytes.
