[//]: # (werk v2)
# bi_rule: schema update to match the api docs
key | value
---------- | ---
date | 2024-02-19T14:34:33+00:00
version | 2.3.0b1
class | fix
edition | cre
component | rest-api
level | 1
compatible | no
The Open API schema previously did not reflect the response or the request
schema format that was required to create or show BI rules. This werk
addresses this issue.
Previously, when creating or getting a BI rule, via the REST-API, the
schema for host_label_groups or service_label_groups looked similar
to the following:
```
"host_label_groups": [
[
"and",
[
["and", "mystery/switch:yes"],
["or", "mystery/switch:no"],
],
],
]
```
This did not match the schema documented in the Open API docs.
To fix this, we have now changed the format to the following
```
"host_label_groups": [
{
"operator": "and",
"label_group": [
{"operator": "and", "label":
"mystery/switch:yes"},
{"operator": "or", "label":
"mystery/switch:no"},
],
},
]
```
This also aligns with other endpoints that use our new
host_label_groups or service_label_groups, for example the
rules endpoints.
As this is a breaking change, user scripts should be adjusted
accordingly.
Show replies by date