Open janniksaxler opened 2 months ago
I'm seeing unexpected behavior on getting even custom variables. When I try a GET request it returns the HTML of the Companion Admin page and not something like the variable value in a JSON format or something. This could certainly be something on my end, but just wanted to mention that GET may not be working at all at the moment, even for custom variables.
Is this a feature relevant to companion itself, and not a module?
Is there an existing issue for this?
Describe the feature
As already discussed in this thread (https://github.com/bitfocus/companion/issues/2575#issuecomment-1909055556) a feature to access all variables inside of companion via the API would be great. But only GET is needed because the values are ste by the devices and only represent a live state.
Example path:
ip:port/api/<connection name>/<variable name>/value
Example for ATEM:ip:port/api/atem/pgm1_input/value
returning the Lable of the input routed to the ATEM's PGM out Example for Hyperdeck:ip:port/api/hyperdeck/countdownTimecodeHMS/value
returning the remaing playout timeIf I'm not wrong at the moment this is only possible by setting a custom variable via a trigger to the value of an other variable an getting the custom variable.
Usecases
Getting (and posting) the custom variables is already a big thing. But for external tools (e.g. a dashboard) using the already existing numerous connections within companion would simplify programming (and reducing network load on devices because only one instance (companion) has to communicate). Dashboards or other external tools would just communicate with the companion API to get the desired variables.
Example: Getting states of video matrix, vision mixer, playout, recorders, etc. out of companion via API, displaying it e.g. in a dashboard or another software. Optional via already existing API: giving values to custom variables back to companion and trigger a button to execute the desired command.