Skip to main content

Layout API (2.0)

LayerService

Layers

List all layers

path Parameters
layoutId
required
string

the id of the Layout

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a layer

path Parameters
layoutId
required
string

the id of the Layout

Request Body schema: application/json

layer to create - all fields have defaults except type.

type
string (the type of layer we're interacting with: e.g alert, banner)
data
object

Custom value for the layer. This is freeform.

x
integer <= 10000

x position in pixels. This can be null if the layer has no absolute position.

y
integer <= 10000

y position in pixels. Can be null if the layer has no absolute position.

width
integer <= 10000

width in pixels of the layer. can be null if the layer is dynamically sizable.

height
integer <= 10000

height in pixels of the layer. can be null if the layer is dynamically sizable.

rotation
integer <double> [ -360 .. 360 ]
Default: "0"

rotation of layer in degrees of the layer.

opacity
number <double> <= 1
Default: "1"

opacity of the layer. This is the same as the CSS value, 0 being transparent and 1 being opaque.

scale
number <double> <= 4
Default: "1"

Scale of the layer. This is expontential, with 1 equaling the normal size of the layer. note: width/height will be affected.

hidden
boolean
Default: "false"

whether the layer should be rendered.

children
Array of objects[ items ]
Default: "[]"

children of the layer.

parentId
string

parent layer to asssign to.

metadata
object
requestMetadata
object (Metadata sent with the request)
Default: "undefined"
Array of objects (Represents how we should apply the action, transitioning from the current state to the new state. If multiple LayerAnimation's are defined, the final LayerAnimation will be used that has a matching property!) [ items ]
Default: "[]"

Animation information for the layer.

Responses

Request samples

Content type
application/json
{
  • "type": "image",
  • "x": 1000,
  • "y": 1000,
  • "width": 1000,
  • "height": 1000,
  • "rotation": 180,
  • "opacity": 180,
  • "scale": 0.8,
  • "hidden": false,
  • "children": [
    ],
  • "parentId": "1234",
  • "metadata": {
    },
  • "requestMetadata": {
    },
  • "requestAnimation": "[]"
}

Response samples

Content type
application/json
{
  • "type": "image",
  • "x": 1000,
  • "y": 1000,
  • "width": 1000,
  • "height": 1000,
  • "rotation": 180,
  • "opacity": 180,
  • "scale": 0.8,
  • "hidden": false,
  • "children": [
    ],
  • "metadata": {
    },
  • "id": "1234",
  • "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    },
  • "requestAnimation": "[]"
}

Batch update

path Parameters
layoutId
required
string

The layout all requests interact with.

Request Body schema: application/json
Array of objects (List of layers to update) [ items ]
requestMetadata
object (Metadata sent with the request)
Default: "undefined"
requestAnimationMode
string (v2RequestAnimationMode)
Enum: "REQUEST_ANIMATION_MODE_PARALLEL" "REQUEST_ANIMATION_MODE_SERIES"

Define how to apply animations in a batch request.

  • REQUEST_ANIMATION_MODE_PARALLEL: All animations in the batch will be applied at once.
  • REQUEST_ANIMATION_MODE_SERIES: Each layer update will appy after all animations on the previous layer(s) have completed.

Responses

Request samples

Content type
application/json
{
  • "layers": [
    ],
  • "requestMetadata": {
    },
  • "requestAnimationMode": "REQUEST_ANIMATION_MODE_PARALLEL"
}

Response samples

Content type
application/json
{
  • "layers": [
    ],
  • "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    },
  • "requestAnimationMode": "REQUEST_ANIMATION_MODE_PARALLEL"
}

Get a single layer

path Parameters
layoutId
required
string

the id of the Layout

layerId
required
string

the id of the Layer

Responses

Response samples

Content type
application/json
{
  • "type": "image",
  • "x": 1000,
  • "y": 1000,
  • "width": 1000,
  • "height": 1000,
  • "rotation": 180,
  • "opacity": 180,
  • "scale": 0.8,
  • "hidden": false,
  • "children": [
    ],
  • "metadata": {
    },
  • "id": "1234",
  • "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    },
  • "requestAnimation": "[]"
}

Delete a layer

path Parameters
layoutId
required
string

the id of the Layout

layerId
required
string

the id of the Layer

Request Body schema: application/json

Metadata associated with the deletion of a layer

requestMetadata
object (Metadata associated with the deletion of a layer)
Default: "undefined"

Responses

Request samples

Content type
application/json
{
  • "requestMetadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "713f6e91-3831-4421-a720-1c8084d10525",
  • "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    }
}

Update a layer

path Parameters
layoutId
required
string

the id of the Layout

layerId
required
string

the id of the Layer

Request Body schema: application/json

layer data to update with.

type
string (the type of layer we're interacting with: e.g alert, banner)
data
object

Custom value for the layer. This is freeform.

x
integer <= 10000

x position in pixels. This can be null if the layer has no absolute position.

y
integer <= 10000

y position in pixels. Can be null if the layer has no absolute position.

width
integer <= 10000

width in pixels of the layer. can be null if the layer is dynamically sizable.

height
integer <= 10000

height in pixels of the layer. can be null if the layer is dynamically sizable.

rotation
integer <double> [ -360 .. 360 ]
Default: "0"

rotation of layer in degrees of the layer.

opacity
number <double> <= 1
Default: "1"

opacity of the layer. This is the same as the CSS value, 0 being transparent and 1 being opaque.

scale
number <double> <= 4
Default: "1"

Scale of the layer. This is expontential, with 1 equaling the normal size of the layer. note: width/height will be affected.

hidden
boolean
Default: "false"

whether the layer should be rendered.

children
Array of objects[ items ]
Default: "[]"

children of the layer.

parentId
string

parent layer to asssign to.

metadata
object
requestMetadata
object (Metadata sent with the request)
Default: "undefined"
Array of objects (Represents how we should apply the action, transitioning from the current state to the new state. If multiple LayerAnimation's are defined, the final LayerAnimation will be used that has a matching property!) [ items ]
Default: "[]"

Animation information for the layer.

Responses

Request samples

Content type
application/json
{
  • "type": "image",
  • "x": 1000,
  • "y": 1000,
  • "width": 1000,
  • "height": 1000,
  • "rotation": 180,
  • "opacity": 180,
  • "scale": 0.8,
  • "hidden": false,
  • "children": [
    ],
  • "parentId": "1234",
  • "metadata": {
    },
  • "requestMetadata": {
    },
  • "requestAnimation": "[]"
}

Response samples

Content type
application/json
{
  • "type": "image",
  • "x": 1000,
  • "y": 1000,
  • "width": 1000,
  • "height": 1000,
  • "rotation": 180,
  • "opacity": 180,
  • "scale": 0.8,
  • "hidden": false,
  • "children": [
    ],
  • "metadata": {
    },
  • "id": "1234",
  • "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    },
  • "requestAnimation": "[]"
}

LayoutService

Layouts

Get all layouts owned by the user.

query Parameters
projectId
string
collectionId
string
type
string
Enum: "LAYOUT_TYPE_SCENELESS" "LAYOUT_TYPE_SCENE"
  • LAYOUT_TYPE_SCENELESS: A layout managed by Studio Kit
  • LAYOUT_TYPE_SCENE: A layout managed via the layout API for use with our scene-based renderer.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new layout

Request Body schema: application/json

layout to create

width
integer <int32> (width of the layer in pixels) <= 10000
height
integer <int32> (height of the layer in pixels) <= 10000
metadata
object <= 10000

Metadata associated with a layout. This is freeform JSON.

projectId
string

Project ID from the Live API for the layout note: this cannot be changed for existing layouts.

collectionId
string

Collection ID from the Live API for the layout note: this cannot be changed once set.

type
string (v2LayoutType)
Enum: "LAYOUT_TYPE_SCENELESS" "LAYOUT_TYPE_SCENE"

The type of layout, specifying how it functions.

  • LAYOUT_TYPE_SCENELESS: A layout managed by Studio Kit
  • LAYOUT_TYPE_SCENE: A layout managed via the layout API for use with our scene-based renderer.
Array of objects (v2Transition) [ items ]

Transitions to apply when switching to this scene from another note: this is only available for layouts of type LAYOUT_TYPE_SCENE.

requestMetadata
object (Metadata associated with the publishing of the event)
Default: "undefined"

Responses

Request samples

Content type
application/json
{
  • "width": 1280,
  • "height": 720,
  • "metadata": {
    },
  • "projectId": "624c6f465887b2894ed87c87",
  • "collectionId": "624c6f475887b2894ed87c89",
  • "type": "LAYOUT_TYPE_SCENELESS",
  • "transitions": [
    ],
  • "requestMetadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "713f6e91-3831-4421-a720-1c8084d10525",
  • "width": 1280,
  • "height": 720,
  • "metadata": {
    },
  • "projectId": "624c6f465887b2894ed87c87",
  • "collectionId": "624c6f475887b2894ed87c89",
  • "type": "LAYOUT_TYPE_SCENELESS",
  • "transitions": [
    ],
  • "requestMetadata": {
    }
}

Get a layout

path Parameters
layoutId
required
string

the id of the Layout

Responses

Response samples

Content type
application/json
{
  • "id": "713f6e91-3831-4421-a720-1c8084d10525",
  • "width": 1280,
  • "height": 720,
  • "metadata": {
    },
  • "projectId": "624c6f465887b2894ed87c87",
  • "collectionId": "624c6f475887b2894ed87c89",
  • "type": "LAYOUT_TYPE_SCENELESS",
  • "transitions": [
    ],
  • "requestMetadata": {
    }
}

Delete a layout

path Parameters
layoutId
required
string

the id of the Layout

Responses

Response samples

Content type
application/json
{
  • "id": "713f6e91-3831-4421-a720-1c8084d10525",
  • "requestMetadata": {
    }
}

Update a layout

path Parameters
layoutId
required
string

the id of the Layout

Request Body schema: application/json

layout data to update with.

width
integer <int32> (width of the layer in pixels) <= 10000
height
integer <int32> (height of the layer in pixels) <= 10000
metadata
object <= 10000

Metadata associated with a layout. This is freeform JSON.

projectId
string

Project ID from the Live API for the layout note: this cannot be changed for existing layouts.

collectionId
string

Collection ID from the Live API for the layout note: this cannot be changed once set.

type
string (v2LayoutType)
Enum: "LAYOUT_TYPE_SCENELESS" "LAYOUT_TYPE_SCENE"

The type of layout, specifying how it functions.

  • LAYOUT_TYPE_SCENELESS: A layout managed by Studio Kit
  • LAYOUT_TYPE_SCENE: A layout managed via the layout API for use with our scene-based renderer.
Array of objects (v2Transition) [ items ]

Transitions to apply when switching to this scene from another note: this is only available for layouts of type LAYOUT_TYPE_SCENE.

requestMetadata
object (Metadata associated with the publishing of the event)
Default: "undefined"

Responses

Request samples

Content type
application/json
{
  • "width": 1280,
  • "height": 720,
  • "metadata": {
    },
  • "projectId": "624c6f465887b2894ed87c87",
  • "collectionId": "624c6f475887b2894ed87c89",
  • "type": "LAYOUT_TYPE_SCENELESS",
  • "transitions": [
    ],
  • "requestMetadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "713f6e91-3831-4421-a720-1c8084d10525",
  • "width": 1280,
  • "height": 720,
  • "metadata": {
    },
  • "projectId": "624c6f465887b2894ed87c87",
  • "collectionId": "624c6f475887b2894ed87c89",
  • "type": "LAYOUT_TYPE_SCENELESS",
  • "transitions": [
    ],
  • "requestMetadata": {
    }
}