Layout API (2.0)
Response samples
- 200
- 404
- default
[- {
- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}
]
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
- Payload
{- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "parentId": "1234",
- "metadata": {
- "name": "Test Layer"
}, - "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}
Response samples
- 200
- 404
- default
{- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "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.
|
Responses
Request samples
- Payload
{- "layers": [
- {
- "create": {
- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "parentId": "1234",
- "metadata": {
- "name": "Test Layer"
}, - "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}, - "update": {
- "id": "12345",
- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "parentId": "1234",
- "metadata": {
- "name": "Test Layer"
}, - "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}, - "delete": {
- "id": "12345",
- "requestMetadata": {
- "example": true
}
}
}
], - "requestMetadata": {
- "example": true
}, - "requestAnimationMode": "REQUEST_ANIMATION_MODE_PARALLEL"
}
Response samples
- 200
- 404
- default
{- "layers": [
- {
- "create": {
- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}, - "update": {
- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}, - "delete": {
- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}
}
}
], - "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "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
- 200
- 404
- default
{- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "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
- Payload
{- "requestMetadata": {
- "example": true
}
}
Response samples
- 200
- 404
- default
{- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}
}
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
- Payload
{- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "parentId": "1234",
- "metadata": {
- "name": "Test Layer"
}, - "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}
Response samples
- 200
- 404
- default
{- "type": "image",
- "x": 1000,
- "y": 1000,
- "width": 1000,
- "height": 1000,
- "rotation": 180,
- "opacity": 180,
- "scale": 0.8,
- "hidden": false,
- "children": [
- "1",
- "2",
- "3"
], - "metadata": {
- "name": "Test Layer"
}, - "id": "1234",
- "layoutId": "713f6e91-3831-4421-a720-1c8084d10525",
- "requestMetadata": {
- "example": true
}, - "requestAnimation": "[]"
}
Get all layouts owned by the user.
query Parameters
projectId | string |
collectionId | string |
type | string Enum: "LAYOUT_TYPE_SCENELESS" "LAYOUT_TYPE_SCENE"
|
Responses
Response samples
- 200
- default
[- {
- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}
]
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.
|
Array of objects (v2Transition) [ items ] Transitions to apply when switching to this scene from another
note: this is only available for layouts of type | |
requestMetadata | object (Metadata associated with the publishing of the event) Default: "undefined" |
Responses
Request samples
- Payload
{- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}
Response samples
- 200
- default
{- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}
Response samples
- 200
- 404
- default
{- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}
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.
|
Array of objects (v2Transition) [ items ] Transitions to apply when switching to this scene from another
note: this is only available for layouts of type | |
requestMetadata | object (Metadata associated with the publishing of the event) Default: "undefined" |
Responses
Request samples
- Payload
{- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}
Response samples
- 200
- 404
- default
{- "id": "713f6e91-3831-4421-a720-1c8084d10525",
- "width": 1280,
- "height": 720,
- "metadata": {
- "name": "Test Layout"
}, - "projectId": "624c6f465887b2894ed87c87",
- "collectionId": "624c6f475887b2894ed87c89",
- "type": "LAYOUT_TYPE_SCENELESS",
- "transitions": [
- {
- "fromLayoutIds": [
- "string"
], - "cut": { },
- "crossfade": {
- "durationMs": 0
}, - "fadeToColor": {
- "durationMs": 0,
- "backgroundColor": "string"
}, - "swipe": {
- "durationMs": 0,
- "direction": "TRANSITION_DIRECTION_LEFT",
- "combinedAnimation": "TRANSITION_SWIPE_TYPE_COMBINED"
}, - "stinger": {
- "cut": {
- "cutPointMs": 0,
- "media": {
- "url": "string",
- "volume": 0
}
}
}
}
], - "requestMetadata": {
- "example": true
}
}