/api/v2/...answers JSON./api/v2/plain/...answerstext/plainwith one flat value.
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)$againstonairis 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
1and0for signals, macros, camera tally and BOOLEAN variables, andtrueandfalseforcore/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 unauthorizedcomes with401,ERR not_readywith503. See Errors and status codes. ?wait=0answersOKwith status202.
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.