Documentation Rules

Hello,

I’m a stupid beginner in programming openHAB2 and don’t have any experience in programming openHAB1.

Actual I try to configure some rules. When I’ve a look to the REST API I find a nice example source code for creating rules.

{
“triggers”: [
{
“id”: “string”,
“label”: “string”,
“description”: “string”,
“configuration”: {},
“typeUID”: “string”
}
],
“conditions”: [
{
“id”: “string”,
“label”: “string”,
“description”: “string”,
“configuration”: {},
“inputs”: {},
“typeUID”: “string”
}
],
“actions”: [
{
“id”: “string”,
“label”: “string”,
“description”: “string”,
“configuration”: {},
“inputs”: {},
“typeUID”: “string”
}
],
“configuration”: {},
“templateUID”: “string”,
“uid”: “string”,
“name”: “string”,
“tags”: [
“string”
],
“visibility”: “VISIBLE”,
“description”: “string”,
“configurationDescriptions”: [
{
“name”: “string”,
“type”: “TEXT”,
“groupName”: “string”,
“pattern”: “string”,
“required”: false,
“readOnly”: false,
“multiple”: false,
“multipleLimit”: 0,
“unit”: “string”,
“unitLabel”: “string”,
“context”: “string”,
“label”: “string”,
“description”: “string”,
“options”: [
{
“label”: “string”,
“value”: “string”
}
],
“filterCriteria”: [
{
“value”: “string”,
“name”: “string”
}
],
“limitToOptions”: false,
“advanced”: false,
“stepSize”: 0,
“minimum”: 0,
“maximum”: 0,
“default”: “string”
}
]
}

Some points I’ve already figured out and I’m able to create a simple rule.
My question is now, is there any detailed documentation for creating rules where every possibility of settings is described. Which commands are possible and so on.

Thanks for your help.

I’m not sure what you found or where but the above looks like javascript, not Rules DSL.

The language is mostly the same between OH 1 and OH 2. You can find the documentation here: