Skip to main content
The ExecutionsResource on the Figranium JavaScript SDK gives you full visibility and control over every task run. Use it to list past executions, inspect a single run, clean up history, stop active runs, and subscribe to a live Server-Sent Events stream of execution updates.

Methods

Returns a paginated-style list of executions. By default it calls GET /api/executions/list, which is the route intended for API-key access. If you pass apiKeyRoute: false, the SDK switches to GET /api/executions instead.
Most callers should leave apiKeyRoute at its default (true). Only override it when your deployment requires the alternate route.
Fetches a single execution by its ID. Calls GET /api/executions/:id. You can supply a generic type parameter to narrow the typed result field.
Removes a single execution record. Calls DELETE /api/executions/:id.
Deletes all executions in bulk. Calls POST /api/executions/clear.
Sends a stop signal to an active run. Calls POST /api/executions/stop.
Opens a Server-Sent Events connection to GET /api/executions/stream and yields each event as it arrives. The iterable stays open until the server closes the stream, the client stops iterating, or the request is aborted.For details on the StreamEvent shape and how cancellation works, see Streaming. For error handling, see Errors.

End-to-end example

This example lists recent executions, inspects the newest one, and stops it if it is still running.