Hey folks,
I want to schedule a downtime via restAPI via query.
I do not fully understand how the query should look like.
Doc says: An query expression of the Livestatus ‘services’ table in nested dictionary form. If you want to use multiple expressions, nest them with the AND/OR operators.
example:
example: {"op": "and", "exprs": [{"op": "=", "left": "name", "right": "example.com"}, {"op": "!=", "left": "state", "right": "0"}]}
what is meant with left and right here?
lq query works like this:
lq "GET services\nColumns: host_name description\nFilter: description ~~ svsko42"
SWFCKO5;Port 02 SVSKO42_S2U
SWFCKO5;SFP Temperature 02 SVSKO42_S2U
SWFCKO5;SFP 02 SVSKO42_S2U
SVSKO42;HostSystem SVSKO42
SWFCKO6;SFP Temperature 02 SVSKO42_S2L
SWFCKO6;Port 02 SVSKO42_S2L
SWFCKO6;SFP 02 SVSKO42_S2L
How do I need to transform that to the RestAPI query?
Thanks a lot for your help!