List rules
GET/rules
List rules.
Authorization Action:
ruleengine:rules:list
Request
Query Parameters
ids string[]
tagLabels string[]
tagLabelValues string[]
severity string
Possible values: [info, warning, critical]
status string
Possible values: [active, inactive]
page number
Possible values: >= 0
Default value:
0pageSize number
Possible values: >= 0
Default value:
1000sort string
Possible values: Value must match regular expression sortingStringRegex
Default value:
createdAt:descResponses
- 200
- application/json
- Schema
- Example (auto)
Schema
results object[]required
totalnumberrequired
{
"results": [
{
"conditions": [
{
"params": {
"source": "messages",
"metric": "urn:cpt:smartdevice:nid:D0CF5EFFFE26FDAB1:onoff",
"channelId": "string",
"threshold": 0,
"comparisonOperator": ">",
"unit": "°C",
"durationSecs": 0,
"activeWindow": {
"from": "08:10",
"to": "13:15",
"timezone": "Europe/Rome"
}
},
"status": "active",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z",
"type": "threshold",
"id": "string"
}
],
"tags": [
{
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z",
"label": "string",
"labelValue": "string",
"metadata": {},
"id": "string"
}
],
"status": "active",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z",
"name": "string",
"severity": "info",
"description": "string",
"processable": "enabled",
"notification": {
"messages": [
{
"target": "string",
"policy": "trigger",
"medium": "email",
"text": "string"
}
]
},
"id": "string"
}
],
"total": 0
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://connhex.com/rules");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());