Get a canvas action
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.projects.actions.retrieve({ projectId: '<projectId>', nodeId: '<nodeId>',});console.log(action);curl -X GET 'https://app.flora.ai/api/v1/projects/<projectId>/actions/<nodeId>' \ -H 'Authorization: Bearer $FLORA_API_KEY'Describes one canvas action node: its declared inputs, outputs and parameter controls (for a custom action, parsed from its code), the parameter values stored on the node, and the nodes wired into it.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project identifier
Project identifier
Canvas action node identifier: the persisted short id (n7) or the node UUID
Canvas action node identifier: the persisted short id (n7) or the node UUID
Responses
Section titled “ Responses ”Canvas action.
object
Project identifier
Canvas action node UUID
True when the node runs its own code rather than a prebuilt action
Action name
Action description
Action source language
Where the action executes: a server sandbox (node, python) or the browser runtime (browser), which a host can also run live
True when the code is a browser-runtime module exporting preview, so a host can mount it live and re-render edits without a run
Cost per execution in USD
True when the node is locked and cannot be run or edited
Action input slots
object
Action input or output name
Action input or output media type
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
Action output slots
object
Action input or output name
Action input or output media type
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
Action parameters (snake_case keys)
object
Action parameter key
Action parameter control type
Action parameter label
Action parameter description
Default parameter value
Allowed parameter values
object
Lowest accepted number
Highest accepted number
Step between accepted numbers
Placeholder shown in an empty text control
For colorList controls: how many colors the value may hold
Conditions under which a control is shown, all of which must hold. Keys are the snake_case keys of this same params list.
Per-axis minimum for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis maximum for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis step for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis minimum for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis maximum for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis step for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Parameter values stored on the node, keyed like params[].key; defaults apply for missing keys
object
Nodes wired into this action, in edge order
Project canvas URL
Example
{ "project_id": "prj_abc123", "node_id": "4d2f7c7e-1b1a-4c7f-9e1d-5b9d1f3b2c10", "action_id": "color-grade-image-browser", "name": "Poster palette", "language": "javascript", "runtime": "node", "inputs": [ { "name": "image", "type": "image", "multiple": true } ], "outputs": [ { "name": "image", "type": "image", "multiple": true } ], "params": [ { "key": "angle", "type": "select", "label": "Angle", "info_tooltip": "Rotation angle in degrees." } ], "connected_inputs": [ { "node_id": "n3", "type": "image" } ]}