Skip to content

Get one layer of a deck slide

GET
/workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document/slides/{slideId}/layers/{layerId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const canva = await client.projects.canvas.getDeckLayer({
workspaceId: '<workspaceId>',
projectId: '<projectId>',
nodeId: '<nodeId>',
slideId: '<slideId>',
layerId: '<layerId>',
});
console.log(canva);

Returns a single layer of one slide on a deck node’s authored document — its transform, blend and content — plus the document revision. Deck nodes only; an unknown node, slide or layer id returns not_found.

Error responses use the standard error body.

workspaceId
required

Workspace identifier

string
/^ws_\S+$/

Workspace identifier

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

nodeId
required

The node’s short id or UUID, as the project graph endpoint reports them

string
>= 1 characters

The node’s short id or UUID, as the project graph endpoint reports them

slideId
required

Slide id on the deck

string
>= 1 characters

Slide id on the deck

layerId
required

Layer id on the slide

string
>= 1 characters

Layer id on the slide

Layer returned.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
id
required

Short node identifier

string
>= 1 characters
node_id
required

Canvas node UUID

string
>= 1 characters
revision
required

Current document revision; pass as base_revision on a changeset update.

integer
slide_id
required

Slide the layer belongs to

string
>= 1 characters
layer
required
Any of:
object
id
required
string
>= 1 characters <= 128 characters
name
string
""
visible
boolean
default: true
locked
boolean
transform
required
object
position
required
object
x
required
number
y
required
number
scale
required

Dimensionless size multipliers. Text uses frame.pixel_width by round(font_size * 7.5) as its reference box (font_size defaults to 144); shapes use 512 by 512; media uses its resolved source dimensions. Divide the desired pixel width and height by the reference dimensions. For a 1200 by 240 text box at font_size 96 on a 1920-wide frame, use x: 0.625, y: 0.3333333333333333.

object
x
required
number
y
required
number
rotation
number
opacity
number
<= 1
blend_mode
string
Allowed values: normal dissolve darken multiply color-burn linear-burn darker-color lighten screen color-dodge linear-dodge lighter-color overlay soft-light hard-light vivid-light linear-light pin-light hard-mix difference exclusion subtract divide hue saturation color luminosity
fill
string
adjustments
object
key
additional properties
number
content_type
required
Allowed value: text
content
required
Any of:
object
kind
required
Allowed value: node_output
node_id
required

Source node UUID or short id in this project, or a node ref declared in the same request. Read responses use UUIDs.

string
>= 1 characters <= 128 characters
output_key
string
text_data

Typography only; the rendered text or live binding belongs in content.

object
font_family
string
font_size
number
text_color
string
font_weight
number
>= 1 <= 1000
font_style
string
Allowed values: normal italic
text_align
string
Allowed values: left center right
text_vertical_align
string
Allowed values: top middle bottom
line_height
Any of:
number
letter_spacing
number
kerning
object
key
additional properties
number
custom_font_id
string
auto_width
boolean
Example
{
"project_id": "prj_abc123",
"id": "n7",
"node_id": "7f6ae6da-4a0e-4a2f-9c6a-2c1c6b8d1f21",
"layer": {
"name": "",
"visible": true,
"blend_mode": "normal",
"content_type": "text",
"content": {
"kind": "node_output"
},
"text_data": {}
}
}