First alert
Define a threshold rule and follow the resulting alert.
Select a numeric tag. Set an opening threshold and the duration for which the opening condition must hold. These values are operational settings chosen for the asset.
curl
curl -X POST "$RDC_BASE_URL/iot/v1/rules" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a1000000-0000-4000-8000-000000000003",
"expectedRevision": 0,
"path": "cold-room-2/temperature",
"operator": "gt",
"threshold": "7.00",
"unit": "°C",
"durationSeconds": 60
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/rules`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a1000000-0000-4000-8000-000000000003",
"expectedRevision": 0,
"path": "cold-room-2/temperature",
"operator": "gt",
"threshold": "7.00",
"unit": "°C",
"durationSeconds": 60
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/iot/v1/rules',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a1000000-0000-4000-8000-000000000003',
'expectedRevision': 0,
'path': 'cold-room-2/temperature',
'operator': 'gt',
'threshold': '7.00',
'unit': '°C',
'durationSeconds': 60,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a1000000-0000-4000-8000-000000000003",
"expectedRevision": 0,
"path": "cold-room-2/temperature",
"operator": "gt",
"threshold": "7.00",
"unit": "°C",
"durationSeconds": 60
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/rules');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/rules");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a1000000-0000-4000-8000-000000000003",
"expectedRevision": 0,
"path": "cold-room-2/temperature",
"operator": "gt",
"threshold": "7.00",
"unit": "°C",
"durationSeconds": 60
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a1000000-0000-4000-8000-000000000003",
"status": "accepted",
"aggregateRevision": 1
} Send good-quality readings through the configured device connection. List alerts for the asset and inspect the rule and opening time. Acknowledge the alert using its current revision.
curl
curl "$RDC_BASE_URL/iot/v1/alerts?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/alerts?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/iot/v1/alerts?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/alerts?limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/alerts?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "alert-1",
"ruleId": "rule-1",
"severity": "critical",
"assetId": "cold-room-2",
"opened": "2026-11-20T09:03:10Z",
"state": "open",
"assignee": null,
"workOrderId": null,
"revision": 1
}
],
"nextCursor": null
} Acknowledgement records that someone has taken responsibility; it does not resolve the condition. Assign an account member and create the ERP work order after assigning a member. A linked work order is not created twice. Read the alert after each completed operation and use its new revision for the next action; choose a fresh operationId for each action.
curl
curl -X POST "$RDC_BASE_URL/iot/v1/alerts/alert-1/acknowledge" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a1000000-0000-4000-8000-000000000010",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/alerts/alert-1/acknowledge`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a1000000-0000-4000-8000-000000000010",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/iot/v1/alerts/alert-1/acknowledge',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a1000000-0000-4000-8000-000000000010',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a1000000-0000-4000-8000-000000000010",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/alerts/alert-1/acknowledge');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/alerts/alert-1/acknowledge");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a1000000-0000-4000-8000-000000000010",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a1000000-0000-4000-8000-000000000010",
"status": "accepted",
"aggregateRevision": 2
} curl
curl -X POST "$RDC_BASE_URL/iot/v1/alerts/alert-1/assign" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a1000000-0000-4000-8000-000000000011",
"expectedRevision": 2,
"assignee": "mihai-stan"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/alerts/alert-1/assign`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a1000000-0000-4000-8000-000000000011",
"expectedRevision": 2,
"assignee": "mihai-stan"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/iot/v1/alerts/alert-1/assign',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a1000000-0000-4000-8000-000000000011',
'expectedRevision': 2,
'assignee': 'mihai-stan',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a1000000-0000-4000-8000-000000000011",
"expectedRevision": 2,
"assignee": "mihai-stan"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/alerts/alert-1/assign');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/alerts/alert-1/assign");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a1000000-0000-4000-8000-000000000011",
"expectedRevision": 2,
"assignee": "mihai-stan"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a1000000-0000-4000-8000-000000000011",
"status": "accepted",
"aggregateRevision": 3
} curl
curl -X POST "$RDC_BASE_URL/iot/v1/alerts/alert-1/work-order" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a1000000-0000-4000-8000-000000000012",
"expectedRevision": 3
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/alerts/alert-1/work-order`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a1000000-0000-4000-8000-000000000012",
"expectedRevision": 3
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/iot/v1/alerts/alert-1/work-order',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a1000000-0000-4000-8000-000000000012',
'expectedRevision': 3,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a1000000-0000-4000-8000-000000000012",
"expectedRevision": 3
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/alerts/alert-1/work-order');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/alerts/alert-1/work-order");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a1000000-0000-4000-8000-000000000012",
"expectedRevision": 3
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a1000000-0000-4000-8000-000000000012",
"status": "accepted",
"aggregateRevision": 4
}