highascg

AMCP REST API Reference (legacy)

Canonical docs: wiki/api/README.md — full endpoint list, Caspar gate, OpenAPI openapi.yaml, and per-topic examples.

HighAsCG maps subset functionality of the underlying CasparCG AMCP protocol into an easy-to-use HTTP REST JSON API. All endpoints are accessible via http://localhost:<PORT>/api.

All server responses include standard headers and use the application/json format.

Channel numbers (WO-868): the examples use the default numbering, where channel 1 is PGM of Screen 1. With Operator GUI first on (Devices → Caspar server page, casparServer.operator_gui_first), channel 1 is the operator GUI and every other channel moves up by one (PGM Screen 1 = 2). A request without channel still means PGM Screen 1.

Table of Contents

  1. Basic Playback Commands
  2. Mixer Commands
  3. CG (Template) Commands
  4. Data & Project Commands
  5. State & Query Commands
  6. Thumbnail & Media Commands
  7. System & Control Commands

1. Basic Playback Commands

POST /api/play

Play a clip on a channel and layer.

POST /api/load, POST /api/loadbg

Loads a clip (or loads it into the background) onto a channel and layer. Wait for POST /api/play to trigger if BG.

POST /api/pause, POST /api/resume, POST /api/stop, POST /api/clear

Controls the playback state or clears the layer content entirely.

POST /api/print, POST /api/log/level, POST /api/log/category

Controls CasparCG disk writing/logging settings.


2. Mixer Commands

Mixer commands can be accessed via POST (to mutate) or GET (to query properties).

POST /api/mixer/:command

Changes mixer configurations for a layer.

GET /api/mixer/:command?channel=X&layer=Y

Queries the value of the mixer property (e.g. GET /api/mixer/opacity?channel=1&layer=10).


3. CG (Template) Commands

Controls HTML and Flash templates running in the CG layer.

POST /api/cg/add

Adds a template to a specific host layer.

POST /api/cg/update

Updates template parameters.

POST /api/cg/play, POST /api/cg/stop, POST /api/cg/next, POST /api/cg/invoke

Controls playback of templates, triggers animations, or invokes JS methods.


4. Data & Project Commands

Stores and retrieves raw strings to CasparCG disk (for memory caching) as well as handles project states.

POST /api/data/store

POST /api/data/retrieve, POST /api/data/remove

POST /api/data/list

Lists datasets stored in CasparCG.

POST /api/project/save, POST /api/project/load

Saves and loads a full HighAsCG project payload into a Caspar dataset (casparcg_web_project).


5. State & Query Commands

Extracts core statuses and telemetry from CasparCG.

GET /api/state

Returns the merged state tree of the HighAsCG app + Caspar variables and channels.

GET /api/server, GET /api/server/queues, GET /api/server/threads, GET /api/server/gl

Gets information about the underlying CasparCG running server.

GET /api/fonts, GET /api/help/:command

Returns all fonts available and documentation on commands.

GET /api/channels/:id, GET /api/channels/:id/delay

Fetches parsed XML info arrays of what is loaded inside a channel (INFO X).


6. Thumbnail & Media Commands

GET /api/thumbnails

Lists all available thumbnails.

GET /api/thumbnail/:filename

Returns a binary PNG response of the requested media thumbnail.

POST /api/thumbnails/generate, POST /api/thumbnails/generate-all

Commands Caspar to regenerate base64 thumb streams.


7. System & Control Commands

POST /api/restart, POST /api/kill

Restarts the underlying AMCP connections and internal structures, or sends KILL to shut off the CasparCG instance entirely.

POST /api/diag, POST /api/gl/gc

Show diagnostic screens or trigger OpenGL Garbage Collection.

POST /api/raw

Arbitrary AMCP payload dispatching.

GET /api/system/operator-first, POST /api/system/operator-first

“Operator GUI first” (WO-868): Caspar channel 1 = the operator GUI, its monitor leftmost, every other channel up by one.