Get a control app's model
Get control app model
GET
https://app.singular.live/apiv2/controlapps/:appToken/model
Returns the model of a control app instance, including the content, type, and structure of its controllable elements. Can be used to build a user interface.
Path Parameters
Name | Type | Description |
---|---|---|
appToken* | String | The shared app token for the app. This is a unique token for this app instance. How to find the shared app token. |
Response definitions
The following table describes the top level key-value pairs for a sub-composition in the Get control app model request.
Response item | Description | Data type |
---|---|---|
id | Composition ID or sub-composition ID, depending where it is in the hierarchy. | String |
name | Composition name or sub-composition name, depending where it is in the hierarchy. | String |
state | The in/out state of a sub-composition. Supported values: | String |
model | The sub-composition's model. It contains a | Array |
logicLayer | The sub-compositions assigned logic layer, if any; default is null. See the logicLayer content table below for a description of its content. | Object |
snapshot | The URL of the snapshot shown when hovering over a sub-composition in the composition tree in Composer. Generate and invoke them from camera icon in Composer's preview toolbar. | URL |
subcompositions | An array of sub-compositions (if any) nested within a composition or sub-composition. | Array |
Model content
The key-value pairs within the model
array.
defaultValue | The sub-composition's default value. Defined in the overlay's composition. | String, Integer, Object |
id | The Model ID. | String |
immediateUpdate | A flag used by control applications to immediately send data. | Boolean |
index | Defines the control node field's position in the hierarchy of control nodes fields. 0 is the top position. | Number |
resetValue | The sub-composition's reset value. Defined in the overlay's composition. | String, Integer, Object |
title | The title of the control node field in Composer. | String |
type | Field type. Supported values: | String |
Field types
Type | Description | Data type |
---|---|---|
text | The field type for a single of text. | String |
textarea | The field type for multi-line text. | String |
number | The field type for a number. | Integer |
image | The field type for an image. | URL |
color | The field type for a color. | Object, String |
checkbox | The field type for a checkbox. | Boolean |
audio | The field type for an audio file. | URL |
json | The field type for JSON data. | Object |
timecontrol | The field type for a timer. | Object |
button | The field type for a button. | Object |
logicLayer
content
logicLayer
contentThe content within the logicLayer object.
Response item | Description | Data type |
---|---|---|
name | The logic layer's name. | String |
delay | The logic later's delay type as defined in the composition. Supported values: | String |
tag | The hex color value assigned to the logic layer. Example: | String |
Last updated