I try to create a Automation Rule with the REST API's
The Automation REST API
Getting an existing (example) rule by UID works fine using a personal API token as OAth2 or scoped does not work. But, okay with a personal token I can go on.
So, using the data from that example rule I try te create a new rule.
However I get the "bad request' error.
Before I copy the whole body in here, are there any simple things I can check?
The questions hat come to my mind are:
Should I pass optional properties as null values or empty arrays, or can I simply leave them out?
And should I also add a new UID for the new rule, or is that created when posting?
For the example rule that I use to copy, there are no connections used for the components. Is that okay?
Is de order of the properties an issue? Is is essential that those properties are like the documenation os the API?
So....
Is there anyone that has some expirence with creating an Automation Rule using this API?