hab-rs-api-client 0.3.0

Bindings for openHAB REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# \RulesApi

All URIs are relative to */rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_rule**]RulesApi.md#create_rule | **POST** /rules | Creates a rule.
[**delete_rule**]RulesApi.md#delete_rule | **DELETE** /rules/{ruleUID} | Removes an existing rule corresponding to the given UID.
[**enable_rule**]RulesApi.md#enable_rule | **POST** /rules/{ruleUID}/enable | Sets the rule enabled status.
[**get_rule_actions**]RulesApi.md#get_rule_actions | **GET** /rules/{ruleUID}/actions | Gets the rule actions.
[**get_rule_by_id**]RulesApi.md#get_rule_by_id | **GET** /rules/{ruleUID} | Gets the rule corresponding to the given UID.
[**get_rule_conditions**]RulesApi.md#get_rule_conditions | **GET** /rules/{ruleUID}/conditions | Gets the rule conditions.
[**get_rule_configuration**]RulesApi.md#get_rule_configuration | **GET** /rules/{ruleUID}/config | Gets the rule configuration values.
[**get_rule_module_by_id**]RulesApi.md#get_rule_module_by_id | **GET** /rules/{ruleUID}/{moduleCategory}/{id} | Gets the rule's module corresponding to the given Category and ID.
[**get_rule_module_config**]RulesApi.md#get_rule_module_config | **GET** /rules/{ruleUID}/{moduleCategory}/{id}/config | Gets the module's configuration.
[**get_rule_module_config_parameter**]RulesApi.md#get_rule_module_config_parameter | **GET** /rules/{ruleUID}/{moduleCategory}/{id}/config/{param} | Gets the module's configuration parameter.
[**get_rule_triggers**]RulesApi.md#get_rule_triggers | **GET** /rules/{ruleUID}/triggers | Gets the rule triggers.
[**get_rules**]RulesApi.md#get_rules | **GET** /rules | Get available rules, optionally filtered by tags and/or prefix.
[**get_schedule_rule_simulations**]RulesApi.md#get_schedule_rule_simulations | **GET** /rules/schedule/simulations | Simulates the executions of rules filtered by tag 'Schedule' within the given times.
[**run_rule_now1**]RulesApi.md#run_rule_now1 | **POST** /rules/{ruleUID}/runnow | Executes actions of the rule.
[**set_rule_module_config_parameter**]RulesApi.md#set_rule_module_config_parameter | **PUT** /rules/{ruleUID}/{moduleCategory}/{id}/config/{param} | Sets the module's configuration parameter value.
[**update_rule**]RulesApi.md#update_rule | **PUT** /rules/{ruleUID} | Updates an existing rule corresponding to the given UID.
[**update_rule_configuration**]RulesApi.md#update_rule_configuration | **PUT** /rules/{ruleUID}/config | Sets the rule configuration values.



## create_rule

> create_rule(rule_dto)
Creates a rule.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_dto** | [**RuleDto**]RuleDto.md | rule data | [required] |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_rule

> delete_rule(rule_uid)
Removes an existing rule corresponding to the given UID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## enable_rule

> enable_rule(rule_uid, body)
Sets the rule enabled status.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**body** | **String** | enable | [required] |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: text/plain
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_actions

> Vec<models::ActionDto> get_rule_actions(rule_uid)
Gets the rule actions.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

[**Vec<models::ActionDto>**](ActionDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_by_id

> models::EnrichedRuleDto get_rule_by_id(rule_uid)
Gets the rule corresponding to the given UID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

[**models::EnrichedRuleDto**](EnrichedRuleDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_conditions

> Vec<models::ConditionDto> get_rule_conditions(rule_uid)
Gets the rule conditions.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

[**Vec<models::ConditionDto>**](ConditionDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_configuration

> String get_rule_configuration(rule_uid)
Gets the rule configuration values.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

**String**

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_module_by_id

> models::ModuleDto get_rule_module_by_id(rule_uid, module_category, id)
Gets the rule's module corresponding to the given Category and ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**module_category** | **String** | moduleCategory | [required] |
**id** | **String** | id | [required] |

### Return type

[**models::ModuleDto**](ModuleDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_module_config

> String get_rule_module_config(rule_uid, module_category, id)
Gets the module's configuration.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**module_category** | **String** | moduleCategory | [required] |
**id** | **String** | id | [required] |

### Return type

**String**

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_module_config_parameter

> String get_rule_module_config_parameter(rule_uid, module_category, id, param)
Gets the module's configuration parameter.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**module_category** | **String** | moduleCategory | [required] |
**id** | **String** | id | [required] |
**param** | **String** | param | [required] |

### Return type

**String**

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: text/plain

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rule_triggers

> Vec<models::TriggerDto> get_rule_triggers(rule_uid)
Gets the rule triggers.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |

### Return type

[**Vec<models::TriggerDto>**](TriggerDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_rules

> Vec<models::EnrichedRuleDto> get_rules(prefix, tags, summary, static_data_only)
Get available rules, optionally filtered by tags and/or prefix.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**prefix** | Option<**String**> |  |  |
**tags** | Option<[**Vec<String>**]String.md> |  |  |
**summary** | Option<**bool**> | summary fields only |  |
**static_data_only** | Option<**bool**> | provides a cacheable list of values not expected to change regularly and honors the If-Modified-Since header, all other parameters are ignored |  |[default to false]

### Return type

[**Vec<models::EnrichedRuleDto>**](EnrichedRuleDTO.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_schedule_rule_simulations

> Vec<models::RuleExecution> get_schedule_rule_simulations(from, until)
Simulates the executions of rules filtered by tag 'Schedule' within the given times.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**from** | Option<**String**> | Start time of the simulated rule executions. Will default to the current time. [yyyy-MM-dd'T'HH:mm:ss.SSSZ] |  |
**until** | Option<**String**> | End time of the simulated rule executions. Will default to 30 days after the start time. Must be less than 180 days after the given start time. [yyyy-MM-dd'T'HH:mm:ss.SSSZ] |  |

### Return type

[**Vec<models::RuleExecution>**](RuleExecution.md)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## run_rule_now1

> run_rule_now1(rule_uid, request_body)
Executes actions of the rule.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**request_body** | Option<[**std::collections::HashMap<String, serde_json::Value>**]serde_json::Value.md> | the context for running this rule |  |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## set_rule_module_config_parameter

> set_rule_module_config_parameter(rule_uid, module_category, id, param, body)
Sets the module's configuration parameter value.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**module_category** | **String** | moduleCategory | [required] |
**id** | **String** | id | [required] |
**param** | **String** | param | [required] |
**body** | **String** | value | [required] |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: text/plain
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_rule

> update_rule(rule_uid, rule_dto)
Updates an existing rule corresponding to the given UID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**rule_dto** | [**RuleDto**]RuleDto.md | rule data | [required] |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_rule_configuration

> update_rule_configuration(rule_uid, request_body)
Sets the rule configuration values.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**rule_uid** | **String** | ruleUID | [required] |
**request_body** | Option<[**std::collections::HashMap<String, serde_json::Value>**]serde_json::Value.md> | config |  |

### Return type

 (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)