Skip to main content
Every Core API route exists twice:
  • /api/v2/... answers JSON.
  • /api/v2/plain/... answers text/plain with one flat value.
Both run the same code, check the same authorization and answer the same status codes. Only the body differs.

Why plain text

Many control surfaces cannot pick a field out of a JSON body:
  • SKAARHOJ panels read feedback with one regular expression on the response body. ^(onair|offair|recording)$ against onair is easy; against a JSON object it is fragile.
  • Stream Deck and Companion can store a response in a variable or show it on a key, but cannot extract a field.
  • Monitoring tools like Zabbix compare one string.

The rules

  • One line, no trailing newline, no quotes. A regular expression with ^ and $ matches the whole body.
  • Flags are 1 and 0 for signals, macros, camera tally and BOOLEAN variables, and true and false for core/active.
  • A camera tally the Core cannot tell is an empty body, not 0.
  • Output statuses and playout phases use an underscore: on_air. The studio status does not: onair.
  • An empty value is an empty body, for example the program title when nothing is on air.
  • Errors keep their status code: ERR unauthorized comes with 401, ERR not_ready with 503. See Errors and status codes.
  • ?wait=0 answers OK with status 202.

Examples

Value per route

See Routes for what each route does.

Matching values on a panel

An ERR … body never matches the expressions with fixed values, so a failed poll shows no value instead of a wrong one. ^(.*)$ matches any body, an error included; use it only for free text such as a scene key or a variable value. A tally lamp with ^(1)$ lights only while the camera is on air: 0, an empty body (tally unknown) and ERR … all leave it off.