Developer Portal
Quick StartsComposition scriptingAPIs and SDKsSupport
  • Portal overview
  • Quick start
  • REST API
    • Introduction
    • Rate limits
    • Authorization
    • How-to guides
      • Get a control app's API token
      • Get a composition's sub-composition IDs and names and their payload structures
      • Get a control app's model
      • Get a control app's metadata
      • Update a sub-composition's content
      • Update a sub-composition's animation state
      • Update a sub-composition's content and animation state in one call
      • Update multiple sub-compositions in one call
    • API reference
      • Get control app details
        • Get a control app's metadata
        • Get a control app's model
        • Get a control app's control data
      • Send data to a control app
        • Update a control app's content
        • Update a control app's animation state
      • Take out all of an app's output
  • Data stream API
    • Introduction
    • Rate limits
    • Authorization
    • How-to guides
      • Create a data stream
      • Link a data stream to a composition
      • Send data to an app using the data stream API
    • API reference
  • Composition scripting
    • Introduction
    • Overview
    • Quick start
      • Find sub-compositions and widgets
      • Read and update control nodes
      • Set text widget text properties
      • Read and update widget properties
      • Read control nodes and update widget properties
      • Set image widget URL property
      • Set table widget content property
    • Cheat sheets
      • Fundamentals
      • Interactive overlays
      • Best practices
    • Use cases
      • Read control nodes and generate HTML text
      • Read control nodes, generate HTML text with background
      • Text Ticker - Start ticker on "In" animation
    • Composition script editor reference
  • Software development kits
    • Graphics SDK
      • Getting started
      • Reference
        • SDK functions
        • Composition object
        • Sequencer object
      • Guides and examples
        • Load a composition with its token
        • Load a composition with its URL
        • Get the composition URL of an app instance
        • Sequencer VOD example
        • Control local preview of app
        • Load app instance output
    • Overlay SDK
      • Getting started
      • SDK functions
      • Use case examples
    • Widget SDK
      • Preparing your environment
      • Getting started
      • Reference
        • Widget UI definition
        • Widget callback functions
        • Time control object
        • Composition instance
      • Guides and examples
        • Widget example: CSS patterns
    • App SDK
  • Singular Basics
    • Overview of Singular
    • Managing overlays in the Dashboard
      • How to create a new composition
      • How to open a new app template
      • How to create an app for a composition
      • How to extract a composition from an app
      • How to find an app's shared app token and shared API URL
      • Dashboard reference
    • Building overlays in Composer
      • How to build a composition
      • How to set up layer logic to automate overlay transitions
      • How to set up control nodes to make widget properties available to a control app
      • Animating overlays
        • How to create timeline animations
        • How to create behavior animations
        • How to create update animations
      • How to make overlays interactive
      • How to adapt overlays to various screen sizes
      • Composer reference
    • Controlling overlays in Studio and UNO
      • How to use Studio
      • Studio reference
      • UNO reference
  • Support
    • Singular status
    • Support resources
    • Singular terminology
    • Performance Testing
Powered by GitBook
On this page
  • Update control app
  • Example request bodies by sub-composition name or ID
  • Control node field types

Was this helpful?

  1. REST API
  2. API reference
  3. Send data to a control app

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

Request Body

Name
Type
Description

subCompositionId

String

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

{
    "success": true
}

Example request bodies by sub-composition name or ID

[
  {
    "subCompositionName": "<subCompositionName>",
    "payload": {
      "<controlnodeId>": "<controlnode content>",
      "<...>": "<...>"
    }
  }, {
    ... 
  }
]
[
  {
    "subCompositionId": "<subcompositionId>",
    "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.

PreviousSend data to a control appNextUpdate a control app's animation state

Last updated 10 months ago

Was this helpful?

The shared app token is a unique token for a single app instance. .

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

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 request.

How to find the shared app token
Get control app model
Get control app model