Act API

Control your act files (scenes and moves) with simple HTTP requests

Active
Base URL: {{API_URL}}

Getting Started

Welcome to the Demo API! This simple HTTP API allows you to control and trigger demos programmatically from the Demo Time extension or external clients. Endpoints are plain GET endpoints that return JSON and accept optional query parameters (for example ?bringToFront=true). For UI clients we recommend polling the /api/demos endpoint periodically (every ~2–5 seconds) to keep scenes and moves in sync with the extension state.

!

Tip

Add ?bringToFront=true to any endpoint to automatically bring the application window to the front.

API Endpoints

GET

List Scenes

Returns all act files, the next scene, and the currently executing act file

Endpoint
/api/demos
Response
{
  "previousEnabled": false,
  "nextDemo": {
    "title": "2. Wrong settings"
  },
  "demos": [{
    "collapsibleState": 2,
    "label": "Pitch",
    "children": [
      {
        "collapsibleState": 0,
        "label": "1. Demo Time",
        "demoFilePath": "/Users/user/project/.demo/pitch.yaml",
        "stepIndex": 0,
        "originalLabel": "Demo Time",
        "isActive": false,
        "hasExecuted": true,
        "disabled": false,
        "tooltip": "1. Demo Time",
        "contextValue": "demo-time.firstStep demo-time.isSlide"
      },
      {
        "collapsibleState": 0,
        "label": "2. Wrong settings",
        "demoFilePath": "/Users/user/project/.demo/pitch.yaml",
        "stepIndex": 1,
        "originalLabel": "Wrong settings",
        "isActive": false,
        "hasExecuted": true,
        "disabled": false,
        "tooltip": "2. Wrong settings",
        "contextValue": "demo-time.step"
      },
      {
        "collapsibleState": 0,
        "label": "3. Slides",
        "demoFilePath": "/Users/user/project/.demo/pitch.yaml",
        "stepIndex": 2,
        "originalLabel": "Slides",
        "isActive": false,
        "hasExecuted": false,
        "disabled": false,
        "tooltip": "3. Slides",
        "contextValue": "demo-time.step demo-time.isSlide"
      }
    ],
    "demoFilePath": "/Users/user/project/.demo/pitch.yaml",
    "description": " pitch.yaml",
    "tooltip": "pitch.yaml",
    "contextValue": "demo-time.file"
  }],
  "currentDemoFile": "/Users/user/project/.demo/pitch.yaml"
}
Description
  • nextDemo: The next scene to be executed (title only), if available.
  • demos: Array of act files with hierarchical structure. Each act file contains children array with individual moves.
  • currentDemoFile: String path to the currently executing act file.
  • children: Array of moves within each file, containing stepIndex, labels, execution status, and contextValue.
Usage Examples
{{API_URL}}/api/demos
GET

Trigger Next Demo

Triggers the next demo in the sequence

Endpoint
/api/next
Parameters
bringToFront boolean optional

Brings the application to the front

Example: true
Usage Examples
{{API_URL}}/api/next
{{API_URL}}/api/next?bringToFront=true
GET

Trigger Previous Demo (if enabled via the demoTime.previousEnabled setting)

Triggers the previous demo in the sequence

Endpoint
/api/previous
Parameters
bringToFront boolean optional

Brings the application to the front

Example: true
Usage Examples
{{API_URL}}/api/previous
{{API_URL}}/api/previous?bringToFront=true
GET

Run Demo by ID

Runs a specific demo by its unique identifier

Endpoint
/api/runById
Parameters
id string required

The unique identifier of the demo to run

Example: demoId
bringToFront boolean optional

Brings the application to the front

Example: true
Usage Examples
{{API_URL}}/api/runById?id=demoId
{{API_URL}}/api/runById?id=demoId&bringToFront=true

Need help? Check out the API documentation at demotime.show