@bravenel does the RMUtils API allow the setting of hub or global variables? I see you can set them via endpoint trigger but hoping the RMUtils API allows this as well. If so what is the syntax to pass the variable name and variable value?
If I take your example above would expect something like the following:
I'm not sure about "legacy" global variables, but hub variables have their own API (this is no longer an RM-specific feature), and documentation on them can be found here for the time being:
Perhaps I'm mis-reading this aspect of the Rule Machine API docs, which explains how the following GET call can be invoked for triggering more than one RM rule at a time using HTTP:
However, repeated attempts have only triggered the 1st rule (appid 723, which makes a lot of sense), but not the 2nd rule (appid 729). The response I get in the Web browser is:
{'result':'Triggered with runRule=723&729'}
...which, on its face, suggests that the intent was for both rules to be triggered. For the record, both rules include a Trigger of "Local Endpoint" and both work as expected when called with their respective RM URLs. Just not in tandem.
So I'm left with these questions, which I hope someone smarter than me can shed light on:
Must each Rule contain a Trigger of type Endpoint in order to be executed by the runRule URL?
Have I formed the multi-Rule calling URL correctly?
Am I missing some other crucial setup for this construct to work?
What is the format (if not JSON) of the response object? (I don't see a list of all possible Success and Error responses listed in the Docs, but didn't hunt far)
Appreciate any enlightenment on this obscure-but-powerful API.
It's my understanding that action in this context is simply a placeholder word standing in for a list of potential actions, like runRule per the Docs. But I will try it ASAP, thanks!
RESULT: {'result':'Triggered with action=723&729'}
(and rule 723 ran while the other one did not, like before). Looks like the response( ) is just a recapitulation of the input string ingredients.
I'm not sure about with RM, but as an alternative, you could look at setting up a Hub Variable with a connector and adding the connector to the list of devices available via a Maker API instance.