# Projects ## List workspace projects `$ flora projects list` **get** `/projects` Returns projects in the requested workspace that are accessible to the authenticated public API key, ordered by recent activity. ### Parameters - `--workspace-id: string` Workspace identifier - `--cursor: optional string` Opaque cursor for fetching the next page - `--limit: optional number` Maximum number of results to return - `--query: optional string` Search query ### Returns - `unnamed_schema_2: object { meta, projects }` - `meta: object { next_cursor, total_estimate }` - `next_cursor: string` Opaque cursor for fetching the next page - `total_estimate: optional number` Estimated total matching items - `projects: array of object { created_at, last_modified, name, 3 more }` - `created_at: number` - `last_modified: number` - `name: string` Project name - `origin: string` Project origin - `project_id: string` Project identifier - `workspace_id: string` Workspace identifier ### Example ```cli flora projects list \ --api-key 'My API Key' \ --workspace-id ws_abc123 ``` #### Response ```json { "meta": { "next_cursor": "eyJvZmZzZXQiOjIwfQ", "total_estimate": 0 }, "projects": [ { "created_at": 0, "last_modified": 0, "name": "Spring Campaign", "origin": "api", "project_id": "prj_abc123", "workspace_id": "ws_abc123" } ] } ``` ## Create a project `$ flora projects create` **post** `/projects` Creates a new Flora project in the requested workspace. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate. ### Parameters - `--name: string` Project name - `--workspace-id: string` Workspace identifier ### Returns - `ProjectNewResponse: object { created_at, last_modified, name, 3 more }` - `created_at: number` - `last_modified: number` - `name: string` Project name - `origin: string` Project origin - `project_id: string` Project identifier - `workspace_id: string` Workspace identifier ### Example ```cli flora projects create \ --api-key 'My API Key' \ --name 'Spring Campaign' \ --workspace-id ws_abc123 ``` #### Response ```json { "created_at": 0, "last_modified": 0, "name": "Spring Campaign", "origin": "api", "project_id": "prj_abc123", "workspace_id": "ws_abc123" } ``` ## Get a project `$ flora projects retrieve` **get** `/projects/{projectId}` Returns metadata for a single project when it is accessible to the authenticated public API key. Missing and inaccessible projects both return 404. ### Parameters - `--project-id: string` Project identifier ### Returns - `ProjectGetResponse: object { created_at, last_modified, name, 3 more }` - `created_at: number` - `last_modified: number` - `name: string` Project name - `origin: string` Project origin - `project_id: string` Project identifier - `workspace_id: string` Workspace identifier ### Example ```cli flora projects retrieve \ --api-key 'My API Key' \ --project-id prj_abc123 ``` #### Response ```json { "created_at": 0, "last_modified": 0, "name": "Spring Campaign", "origin": "api", "project_id": "prj_abc123", "workspace_id": "ws_abc123" } ``` ## List project canvas nodes `$ flora projects list-nodes` **get** `/projects/{projectId}/nodes` Returns sanitized visible media nodes on a project canvas. The response omits raw graph documents, Liveblocks internals, raw Convex IDs, and unbounded node data blobs. ### Parameters - `--project-id: string` Project identifier - `--cursor: optional string` Opaque cursor for fetching the next page - `--limit: optional number` Maximum number of results to return ### Returns - `unnamed_schema_3: object { canvas_url, meta, nodes, project_id }` - `canvas_url: string` Project canvas URL - `meta: object { next_cursor, total_estimate }` - `next_cursor: string` Opaque cursor for fetching the next page - `total_estimate: optional number` Estimated total matching items - `nodes: array of object { node_id, type, asset_id, 4 more }` - `node_id: string` Canvas node identifier - `type: "image" or "video" or "audio" or "text"` Canvas node media type - `"image"` - `"video"` - `"audio"` - `"text"` - `asset_id: optional string` Asset identifier - `height: optional number` - `label: optional string` Canvas node label - `url: optional string` Canvas node output URL or text content - `width: optional number` - `project_id: string` Project identifier ### Example ```cli flora projects list-nodes \ --api-key 'My API Key' \ --project-id prj_abc123 ``` #### Response ```json { "canvas_url": "https://example.com", "meta": { "next_cursor": "eyJvZmZzZXQiOjIwfQ", "total_estimate": 0 }, "nodes": [ { "node_id": "node_abc123", "type": "image", "asset_id": "asset_abc123", "height": 0, "label": "Logo", "url": "https://media.flora.ai/output.png", "width": 0 } ], "project_id": "prj_abc123" } ``` # Assets ## Attach an asset to a canvas `$ flora projects:assets attach-asset` **post** `/projects/{projectId}/assets/{assetId}/attach` Attaches an existing ready asset to a project canvas as a static media node. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate. ### Parameters - `--project-id: string` Project identifier - `--asset-id: string` Asset identifier ### Returns - `ProjectAssetAttachAssetResponse: object { asset_id, canvas_url, node_id, project_id }` - `asset_id: string` Asset identifier - `canvas_url: string` Project canvas URL - `node_id: string` Canvas node identifier - `project_id: string` Project identifier ### Example ```cli flora projects:assets attach-asset \ --api-key 'My API Key' \ --project-id prj_abc123 \ --asset-id asset_abc123 ``` #### Response ```json { "asset_id": "asset_abc123", "canvas_url": "https://example.com", "node_id": "node_abc123", "project_id": "prj_abc123" } ```