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
[
{
"id": "-NC_s8grzroliz2xbx7e",
"name": "default",
"model": [],
"logicLayer": null,
"snapshot": null,
"subcompositions": [
{
"id": "1695dbd7-430c-40eb-82f7-85287a965849",
"name": "compTextArea",
"state": "Out",
"model": [
{
"defaultValue": "Multi-line Text \nfrom Google Sheet",
"id": "text-area-control-node-id",
"immediateUpdate": false,
"index": 1,
"resetValue": "Default Text",
"title": "text-area-control-node-id",
"type": "textarea"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "1e602003-5bfa-45f4-8049-8892220fdff2",
"name": "compTimer",
"state": "Out",
"model": [
{
"defaultValue": {
"UTC": 1615816679354,
"isRunning": false,
"value": 0
},
"id": "time-control-node-id",
"immediateUpdate": true,
"index": 0,
"resetValue": {
"UTC": 0,
"isRunning": false,
"value": 0
},
"title": "time-control-node-id",
"type": "timecontrol"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "41aaf130-468c-4f11-9bca-c1ea68ba1c8b",
"name": "compColor",
"state": "Out",
"model": [
{
"defaultValue": {
"a": 1,
"b": 156,
"g": 188,
"r": 26
},
"id": "color-control-node-id",
"immediateUpdate": false,
"index": 2,
"resetValue": {
"a": 1,
"b": 255,
"g": 255,
"r": 255
},
"title": "color-control-node-id",
"type": "color"
},
{
"defaultValue": "crimson",
"id": "cnColorText",
"immediateUpdate": false,
"index": 1,
"resetValue": "Default Text",
"title": "cnColorText",
"type": "text"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "755bd36f-fff0-4250-b703-4cbd310f07fb",
"name": "compVideoClip",
"state": "Out",
"model": [
{
"defaultValue": {
"__singularButton": true,
"ts": 0
},
"id": "cnVideoClipPause",
"immediateUpdate": true,
"index": 2,
"resetValue": {
"__singularButton": true,
"ts": 0
},
"title": "cnVideoClipPause",
"type": "button"
},
{
"defaultValue": {
"__singularButton": true,
"ts": 0
},
"id": "cnVideoClipPlay",
"immediateUpdate": true,
"index": 1,
"resetValue": {
"__singularButton": true,
"ts": 0
},
"title": "cnVideoClipPlay",
"type": "button"
},
{
"defaultValue": {
"__singularButton": true,
"ts": 0
},
"id": "cnVideoClipStart",
"immediateUpdate": true,
"index": 0,
"resetValue": {
"__singularButton": true,
"ts": 0
},
"title": "cnVideoClipStart",
"type": "button"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "7ccc118d-5333-474d-9a33-b5fb951cd765",
"name": "compJsonTable",
"state": "Out",
"model": [
{
"defaultValue": "{\"content\": [\r\n {\"pos\": \"1\", \"name\": \"NYG\", \"image\": \"https://image.singular.live/f12f184c9a0eb763beb40478e02a1250/images/4BhR3iwVI7oTpuMPQFSNBE.png\"},\r\n {\"pos\": \"2\", \"name\": \"SF\", \"image\": \"https://image.singular.live/f12f184c9a0eb763beb40478e02a1250/images/1PpN2FpuAutk3zeYILkDum.png\"},\r\n {\"pos\": \"3\", \"name\": \"DEN\", \"image\": \"https://image.singular.live/f12f184c9a0eb763beb40478e02a1250/images/7Mg4XYFRQWiwT5IKIoH1E7.png\"},\r\n {\"pos\": \"4\", \"name\": \"PIT\", \"image\": \"https://image.singular.live/f12f184c9a0eb763beb40478e02a1250/images/5K84dUL3ACt2l4pCCfwRP4.png\"}\r\n ]\r\n}",
"height": "100px",
"id": "json-control-node-id",
"immediateUpdate": false,
"index": 0,
"resetValue": "{}",
"title": "json-control-node-id",
"type": "json"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "816df4ac-3231-49a2-b744-ccd48aa33a40",
"name": "compText",
"state": "Out",
"model": [
{
"defaultValue": "Text from Google Sheet",
"id": "text-control-node-id",
"immediateUpdate": false,
"index": 0,
"resetValue": "Default Text",
"title": "text-control-node-id",
"type": "text"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "9d0ebd84-bdae-6adc-2050-d54c36448d70",
"name": "background",
"state": "Out",
"model": [],
"logicLayer": {
"name": "Background",
"tag": "#5e35b1"
},
"snapshot": null,
"subcompositions": []
},
{
"id": "ab6e39f9-5550-47c2-81be-fa07611a6666",
"name": "compCheckbox",
"state": "Out",
"model": [
{
"defaultValue": true,
"id": "checkbox-control-node-id",
"immediateUpdate": false,
"index": 0,
"resetValue": true,
"title": "checkbox-control-node-id",
"type": "checkbox"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
},
{
"id": "ca6f12cf-d990-464b-948b-5d7ad9dd3d33",
"name": "compNumber",
"state": "Out",
"model": [
{
"defaultValue": "1234.56",
"id": "number-control-node-id",
"immediateUpdate": false,
"index": 0,
"resetValue": 0,
"step": "0.01",
"title": "number-control-node-id",
"type": "number"
},
{
"defaultValue": "$1,234.56",
"id": "cnNumberDisplayed",
"immediateUpdate": false,
"index": 1,
"resetValue": "Default Text",
"title": "cnNumberDisplayed",
"type": "text"
}
],
"logicLayer": null,
"snapshot": null,
"subcompositions": []
}
]
}
]
Response definitions
The following table describes the top level key-value pairs for a sub-composition in the Get control app model request.
Model content
The key-value pairs within the model
array.
Field types
logicLayer
content
logicLayer
contentThe content within the logicLayer object.
Last updated