Syntax for getRuleList http

Can some one confirm my syntax for retrieving a json file containing my rules... the following syntax returns an app exception

HTTP://192.168.x.x/apps/api/10249/trigger/getRuleList?access_token=????????-????-???? ETC

My access-token is from the Makerapi examples


First, Is app 10249 a Maker API instance? If so, that won't work; Maker API does not have access to the Rule Machine API. If app 10249 is a Rule, that will not work because each app generates its own token, and a Maker API instance would not have any relation to the Rule whose token you need. (EDIT: Actually, it looks like you might have taken "10249" from the example in the docs, so one problem is definitely that you need the actual app ID for your rule--more on that below.)

What you need is a rule with a "local endpoint" trigger specified. Then you'll get a token for that rule, and you'll get an example of a URL that is close to the one you'll need to use. The example will have trigger in it, but you'll need to replace that with trigger/getRuleList as in the URL you have above (which is otherwise correct). It will look something like:


1 Like

Thank you, that worked. I don't fully understand why you have to create a 'local endpoint' triggered rule for this to work. I was expecting the 'getRuleList' would be like MakerAPI where you can just use a url, including access token of course, to get a list of devices. Yes I did use the 10249 thinking thats the magic number for HE to send me the list of rules, the documentation is not that clear. But it works and I can proceed.

Thanks again

Rule Machine and Maker API are separate apps, and Maker API does not have access to the Rule Machine API. (Maker API is mostly geared towards controlling and getting updates for the selected devices, though there are some other features it can work with, like hub modes or HSM. RM just isn't one.)

It's maybe a little odd that you need to create a trigger in a rule to make this work even though you're not interested in (necessarily) triggering that rule, but rules don't have local or cloud endpoints by default, including the OAuth token you need to make either work, so I suppose this is just a way to get that to happen.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.