Update a control app's content

Update control app

PATCH https://app.singular.live/apiv2/controlapps/:appToken/control

Updates the data of a sub-composition in an overlay. Either subCompositionID or subCompositionName is required.

Path Parameters

Name
Type
Description

appToken

String

The shared app token is a unique token for a single app instance. How to find the shared app token.

Request Body

Name
Type
Description

subCompositionId

String

The sub-composition ID. Either the subCompositionID or the subCompositionName must be included in the request. Get them from the payload of the Get control app model request.

payload

Object

A JSON object that contains control-level elements of the sub-composition.

controlnodeID

String

The ID of a control node.

controlNodeContent

FieldType

New control node content.

subCompositionName

String

The name of the sub-composition. Either the subCompositionID or the subCompositionName must be included in the request. Get them from the payload of the Get control app model request.

{
    "success": true
}

Example request bodies by sub-composition name or ID

[
  {
    "subCompositionName": "<subCompositionName>",
    "payload": {
      "<controlnodeId>": "<controlnode content>",
      "<...>": "<...>"
    }
  }, {
    ... 
  }
]

Control node field types

<fieldType>
Example
Description

<Text>

"John Doe"

A single line of text.

<Text Area>

"Title/nSubtitle"

Multiple lines of text.

<Number>

123.45

A number.

<NormalizedNumber>

50.0

A value between 0 and 100.

<Counter>

1

A number.

<Selection>

"option"

The id of the selected item from the option list.

<Image>

"https://www.gstatic.com/webp/gallery3/1.png"

An image URL.

<Color>

"lightgray", "#33AAFF", "#33AAFF55", rbg(150, 150, 150)", rgba(255, 150, 150, 0.5)"

An HTML color name, a color HEX code, a color HEX code with alpha, a color rgb value, or a color rgba value.

<Checkbox>

true, false

A checkbox checked (true) or unchecked (false).

<Audio>

"https://domain.com/audio.mp3"

The URL of an audio file.

<JSON Text>

"{"id": 1,"firstname": "John","lastname": "Doe"}"

A stringified JSON object.

<Time Control>

{"command": "play"}, {"command": "pause"}, {"command": "reset"}, {"command": "start"}

Plays, pauses, starts, or resets the timer.

<Button>

"execute"

Triggers a button click event.

Last updated