Get a canvas definition
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const canva = await client.projects.canvas.getDefinition({ workspaceId: '<workspaceId>', projectId: '<projectId>',});console.log(canva);curl -X GET 'https://app.flora.ai/api/v1/workspaces/<workspaceId>/projects/<projectId>/canvas/definition' \ -H 'Authorization: Bearer $FLORA_API_KEY'Returns the canonical JSON definition needed to reconstruct a project canvas, including nodes, edges, inputs, current outputs, positions, and Layer Editor documents when present.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Workspace identifier
Workspace identifier
Project identifier
Project identifier
Responses
Section titled “ Responses ”Canvas definition returned.
object
Project identifier
Project canvas URL
object
Complete ordered canvas node list
object
Stable canvas node identifier
Flora canvas node type
Durable public node configuration; transient collaboration state is omitted
object
Parent group node identifier
Whether moving the node may expand its parent group
Authored node width
Authored node height
Durable node style properties
object
React Flow node origin
Canvas stacking order
Whether the node is hidden
Persisted node position
object
Horizontal canvas coordinate
Vertical canvas coordinate
Complete canvas edge list
object
Stable canvas edge identifier
Source node identifier
Target node identifier
Canvas edge renderer type
Durable edge configuration
object
Complete per-node generation and action input configuration
object
object
Complete current durable output attached to each node
object
object
Portable Layer Editor documents keyed by Layer Editor node identifier; omitted when no Layer Editor nodes exist
object
object
object
Example
{ "project_id": "prj_abc123", "definition": { "nodes": [ { "id": "node_abc123", "type": "videoBlock", "extent": "parent" } ], "edges": [ { "id": "edge_abc123" } ] }}