Long story short I am using a tool called uptime Kuma. When uptime kuma detects something is down it has the option to send a notifcation or it can do a webhook. But the webhook is POST only. I know how setup makerAPI to do a get to change a device but I am not sure how to do a POST. Is that possible?
I am pretty sure that Maker API expects a http GET, not a POST. Tagging @mike.maxwell for confirmation.
Current Release of Maker API does not support POST for setting a device. However, this is easy to add as an option, so we will do that for the next release. It will basically act just like a GET, where all of the information is in the URL, and the Request Body is ignored.
Nice, lots of people use Uptime Kuma (including me). Not sure what I would do with the info exactly but I am sure some people will have a use for it.
Not sure if it would make even more sense to add it to RM as a trigger endpoint? I think you can already make a GET endpoint, could you do a POST endpoint instead? I have not really used it before but have seen people talking about it on here.
RM already allows POST to its endpoints.
Ok perfect, that is probably the only solution that OP needs in this case!
I tried searching around if you could POST to RM but could not find anything. Did not actually try setting it up myself though to see it in RM.
Me neither. I just went to look at the code, and saw that it's already there -- has been for a long time.
Just tested it... Works as expected. That is, I tested POST to an RM trigger endpoint.
Looks like you could just create a Rule Machine and use a Local (or cloud) endpoint as the trigger.
It should work for a GET or POST request.
It will look like this and the URL is in the link provided when editing the trigger
I may test this out in Uptime Kuma later today just for fun.
Then you can do anything you want in the rule, turn on a device, flash some lights, whatever...
Thanks for the idea. I personly don't use rule machine at all. I use webcore.
Oh well I did see some posts hinting that you can also create POSTable endpoints with webcore as well I think. Unless they were talking about sending POST requests out from webcore, was not totally sure.