IoT Platform API
Manage IoT devices, fleet operations, alarm rules, telemetry, and notifications.
Base URL: https://api.wayscloud.services
Authentication: X-API-Key header with iot service permission.
Quick Start:
# Register a device
curl -X POST https://api.wayscloud.services/v1/iot/devices \
-H "X-API-Key: wayscloud_xxx" \
-H "Content-Type: application/json" \
-d '{"name": "Sensor A", "device_type": "ESP32"}'
# List alarms
curl https://api.wayscloud.services/v1/iot/alarms?status=active \
-H "X-API-Key: wayscloud_xxx"
# Create webhook notification channel
curl -X POST https://api.wayscloud.services/v1/iot/notifications/channels \
-H "X-API-Key: wayscloud_xxx" \
-H "Content-Type: application/json" \
-d '{"name": "Ops Webhook", "channel_type": "webhook", "config": {"url": "https://example.com/hook"}}'Resources: Devices, Groups, Profiles, Rules, Alarms, Telemetry, Notifications
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/iot/devices | List devices |
POST | /v1/iot/devices | Register device |
GET | /v1/iot/devices/{device_id} | Get device |
PATCH | /v1/iot/devices/{device_id} | Update device |
DELETE | /v1/iot/devices/{device_id} | Delete device |
GET | /v1/iot/devices/{device_id}/health | Get device health |
GET | /v1/iot/devices/{device_id}/tags | List device tags |
POST | /v1/iot/devices/{device_id}/tags | Add tags to device |
DELETE | /v1/iot/devices/{device_id}/tags/{tag} | Remove tag from device |
GET | /v1/iot/groups | List device groups |
POST | /v1/iot/groups | Create device group |
GET | /v1/iot/groups/{group_id} | Get device group |
PUT | /v1/iot/groups/{group_id} | Update device group |
DELETE | /v1/iot/groups/{group_id} | Delete device group |
POST | /v1/iot/groups/{group_id}/devices | Add devices to group |
DELETE | /v1/iot/groups/{group_id}/devices/{device_id} | Remove device from group |
GET | /v1/iot/profiles | List device profiles |
POST | /v1/iot/profiles | Create device profile |
GET | /v1/iot/profiles/{profile_id} | Get device profile |
PUT | /v1/iot/profiles/{profile_id} | Update device profile |
DELETE | /v1/iot/profiles/{profile_id} | Delete device profile |
POST | /v1/iot/profiles/{profile_id}/apply/{device_id} | Apply profile to device |
GET | /v1/iot/rules | List alarm rules |
POST | /v1/iot/rules | Create alarm rule |
GET | /v1/iot/rules/{rule_id} | Get alarm rule |
PUT | /v1/iot/rules/{rule_id} | Update alarm rule |
DELETE | /v1/iot/rules/{rule_id} | Delete alarm rule |
POST | /v1/iot/rules/{rule_id}/enable | Enable alarm rule |
POST | /v1/iot/rules/{rule_id}/disable | Disable alarm rule |
GET | /v1/iot/alarms | List alarms |
GET | /v1/iot/alarms/summary | Get alarm summary |
GET | /v1/iot/alarms/{alarm_id} | Get alarm details |
GET | /v1/iot/alarms/{alarm_id}/timeline | Get alarm event timeline |
POST | /v1/iot/alarms/{alarm_id}/acknowledge | Acknowledge alarm |
POST | /v1/iot/alarms/{alarm_id}/resolve | Resolve alarm |
POST | /v1/iot/alarms/{alarm_id}/reopen | Reopen a resolved alarm |
GET | /v1/iot/datapoints | List datapoint definitions |
POST | /v1/iot/datapoints | Create datapoint definition |
GET | /v1/iot/datapoints/{datapoint_id} | Get datapoint definition |
PUT | /v1/iot/datapoints/{datapoint_id} | Update datapoint definition |
DELETE | /v1/iot/datapoints/{datapoint_id} | Delete datapoint definition |
GET | /v1/iot/devices/{device_id}/telemetry | Get device telemetry |
GET | /v1/iot/devices/{device_id}/telemetry/latest | Get latest telemetry values |
GET | /v1/iot/notifications/channels | List notification channels |
POST | /v1/iot/notifications/channels | Create notification channel |
GET | /v1/iot/notifications/channels/{channel_id} | Get notification channel |
PUT | /v1/iot/notifications/channels/{channel_id} | Update notification channel |
DELETE | /v1/iot/notifications/channels/{channel_id} | Delete notification channel |
POST | /v1/iot/notifications/channels/{channel_id}/test | Send test notification |
GET | /v1/iot/notifications/policies | List notification policies |
POST | /v1/iot/notifications/policies | Create notification policy |
GET | /v1/iot/notifications/policies/{policy_id} | Get notification policy |
PUT | /v1/iot/notifications/policies/{policy_id} | Update notification policy |
DELETE | /v1/iot/notifications/policies/{policy_id} | Delete notification policy |
GET | /v1/iot/notifications/deliveries | List notification deliveries |
GET | /v1/iot/credentials | Get MQTT connection info |
GET | /v1/iot/subscription | Get IoT subscription |
GET | /v1/iot/usage | Get usage statistics |
GET | /v1/iot/stats | Get platform statistics |
GET /v1/iot/devices
List devices
Retrieve a paginated list of registered IoT devices.
Response:
| Field | Type | Description |
|---|---|---|
devices | array | Required. List of device objects |
total | integer | Required. Total number of devices matching filter |
page | integer | Required. Current page number |
page_size | integer | Required. Items per page |
Example:
curl https://api.wayscloud.services/v1/iot/devices \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"devices": [
{
"device_id": "sensor-001",
"name": "Temperature Sensor A",
"is_active": true,
"is_online": true,
"last_seen": "2026-03-30T09:55:00Z"
},
{
"device_id": "sensor-002",
"name": "Humidity Sensor B",
"is_active": true,
"is_online": true
}
],
"total": 42,
"page": 1,
"page_size": 20,
"has_more": true
}POST /v1/iot/devices
Register device
Register a new IoT device and generate MQTT credentials. Subject to plan device limits.
Request Body:
| Field | Type | Description |
|---|---|---|
device_id | object | Unique device identifier. Auto-generated UUID if omitted. |
name | string | Required. Human-readable device name |
description | object | Device description |
device_type | object | Device type or model |
metadata | object | Custom key-value metadata |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/devices \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"description": "Office floor 3",
"device_type": "ESP32",
"metadata": {
"firmware": "2.1.0",
"location": "oslo"
},
"name": "Temperature Sensor A"
}'Response:
{
"device_id": "sensor-001",
"name": "Temperature Sensor A",
"device_type": "ESP32",
"is_active": true,
"is_online": true,
"last_seen": "2026-03-30T09:55:00Z",
"connection_status": "connected",
"stability_score": 95,
"firmware_version": "2.1.0",
"tags": [
"production",
"floor-3"
],
"metadata": {
"location": "Building A"
},
"messages_24h": 1440,
"battery_level": 87,
"signal_strength": -65,
"created_at": "2026-01-15T10:00:00Z"
}GET /v1/iot/devices/
Get device
Retrieve detailed information about a specific device.
Example:
curl https://api.wayscloud.services/v1/iot/devices/{device_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"device_id": "sensor-001",
"name": "Temperature Sensor A",
"device_type": "ESP32",
"is_active": true,
"is_online": true,
"last_seen": "2026-03-30T09:55:00Z",
"connection_status": "connected",
"stability_score": 95,
"firmware_version": "2.1.0",
"tags": [
"production",
"floor-3"
],
"metadata": {
"location": "Building A"
},
"messages_24h": 1440,
"battery_level": 87,
"signal_strength": -65,
"created_at": "2026-01-15T10:00:00Z"
}PATCH /v1/iot/devices/
Update device
Update device name, description, type, metadata, or active status.
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | New device name |
description | object | New description |
device_type | object | New device type |
metadata | object | Replace custom metadata |
is_active | object | Activate or deactivate device |
Example:
curl -X PATCH https://api.wayscloud.services/v1/iot/devices/{device_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"is_active": false,
"name": "Temperature Sensor A (updated)"
}'Response:
{
"device_id": "sensor-001",
"name": "Temperature Sensor A",
"device_type": "ESP32",
"is_active": true,
"is_online": true,
"last_seen": "2026-03-30T09:55:00Z",
"connection_status": "connected",
"stability_score": 95,
"firmware_version": "2.1.0",
"tags": [
"production",
"floor-3"
],
"metadata": {
"location": "Building A"
},
"messages_24h": 1440,
"battery_level": 87,
"signal_strength": -65,
"created_at": "2026-01-15T10:00:00Z"
}DELETE /v1/iot/devices/
Delete device
Delete device and revoke MQTT credentials. Cannot be undone.
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/devices/{device_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"GET /v1/iot/devices/{device_id}/health
Get device health
Health score (0-100) with component breakdown: uptime, alarms, stability, freshness.
Example:
curl https://api.wayscloud.services/v1/iot/devices/{device_id}/health \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"device_id": "sensor-001",
"health_score": 92,
"health_status": "healthy",
"components": {
"uptime": 100,
"alarm_burden": 95,
"connection_stability": 90,
"telemetry_freshness": 85
},
"checked_at": "2026-03-30T10:00:00Z"
}GET /v1/iot/devices/{device_id}/tags
List device tags
Example:
curl https://api.wayscloud.services/v1/iot/devices/{device_id}/tags \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"tags": [
"production",
"floor-3",
"critical"
]
}POST /v1/iot/devices/{device_id}/tags
Add tags to device
Request Body:
Example:
curl -X POST https://api.wayscloud.services/v1/iot/devices/{device_id}/tags \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '[
"production",
"floor-3"
]'Response:
{
"added": [
"new-tag-1",
"new-tag-2"
]
}DELETE /v1/iot/devices/{device_id}/tags/
Remove tag from device
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/devices/{device_id}/tags/{tag} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"GET /v1/iot/groups
List device groups
Example:
curl https://api.wayscloud.services/v1/iot/groups \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"groups": [
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "Floor 3 Sensors",
"description": "All sensors on floor 3",
"color": "#FF5733"
}
]
}POST /v1/iot/groups
Create device group
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. Group name |
description | object | Group description |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/groups \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"description": "All sensors on floor 3",
"name": "Floor 3 Sensors"
}'Response:
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "Floor 3 Sensors",
"description": "All sensors on floor 3",
"color": "#FF5733",
"created_at": "2026-01-20T14:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}GET /v1/iot/groups/
Get device group
Example:
curl https://api.wayscloud.services/v1/iot/groups/{group_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "Floor 3 Sensors",
"description": "All sensors on floor 3",
"color": "#FF5733",
"created_at": "2026-01-20T14:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}PUT /v1/iot/groups/
Update device group
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | New group name |
description | object | New description |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/groups/{group_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"name": "Floor 3 Sensors (renamed)"
}'Response:
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "Floor 3 Sensors",
"description": "All sensors on floor 3",
"color": "#FF5733",
"created_at": "2026-01-20T14:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}DELETE /v1/iot/groups/
Delete device group
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/groups/{group_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"POST /v1/iot/groups/{group_id}/devices
Add devices to group
Request Body:
Example:
curl -X POST https://api.wayscloud.services/v1/iot/groups/{group_id}/devices \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"device_ids": ["sensor-001", "sensor-002"]}'Response:
{
"count": 3,
"added": [
"sensor-001",
"sensor-002",
"sensor-003"
]
}DELETE /v1/iot/groups/{group_id}/devices/
Remove device from group
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/groups/{group_id}/devices/{device_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"GET /v1/iot/profiles
List device profiles
Example:
curl https://api.wayscloud.services/v1/iot/profiles \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"profiles": [
{
"id": "b2c3d4e5-6789-0abc-def1-234567890bcd",
"name": "Temperature Sensor Profile",
"reporting_interval_seconds": 60
}
]
}POST /v1/iot/profiles
Create device profile
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. Profile name |
description | object | Profile description |
expected_topics | object | MQTT topics the device should publish to |
reporting_interval_seconds | object | Expected reporting interval in seconds |
metadata | object | Profile metadata |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/profiles \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"expected_topics": [
"devices/+/sensors/temperature"
],
"name": "Standard Sensor",
"reporting_interval_seconds": 60
}'Response:
{
"id": "b2c3d4e5-6789-0abc-def1-234567890bcd",
"name": "Temperature Sensor Profile",
"description": "Standard temperature/humidity sensors",
"expected_topics": [
"devices/+/sensors/temperature",
"devices/+/sensors/humidity"
],
"reporting_interval_seconds": 60,
"metadata": {
"sensor_type": "DHT22"
},
"created_at": "2026-01-10T12:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}GET /v1/iot/profiles/
Get device profile
Example:
curl https://api.wayscloud.services/v1/iot/profiles/{profile_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "b2c3d4e5-6789-0abc-def1-234567890bcd",
"name": "Temperature Sensor Profile",
"description": "Standard temperature/humidity sensors",
"expected_topics": [
"devices/+/sensors/temperature",
"devices/+/sensors/humidity"
],
"reporting_interval_seconds": 60,
"metadata": {
"sensor_type": "DHT22"
},
"created_at": "2026-01-10T12:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}PUT /v1/iot/profiles/
Update device profile
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | |
description | object | |
expected_topics | object | |
reporting_interval_seconds | object | |
metadata | object |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/profiles/{profile_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"reporting_interval_seconds": 120
}'Response:
{
"id": "b2c3d4e5-6789-0abc-def1-234567890bcd",
"name": "Temperature Sensor Profile",
"description": "Standard temperature/humidity sensors",
"expected_topics": [
"devices/+/sensors/temperature",
"devices/+/sensors/humidity"
],
"reporting_interval_seconds": 60,
"metadata": {
"sensor_type": "DHT22"
},
"created_at": "2026-01-10T12:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}DELETE /v1/iot/profiles/
Delete device profile
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/profiles/{profile_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"POST /v1/iot/profiles/{profile_id}/apply/
Apply profile to device
Example:
curl -X POST https://api.wayscloud.services/v1/iot/profiles/{profile_id}/apply/{device_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"profile_id": "prof-abc123",
"device_id": "sensor-001",
"applied": true
}GET /v1/iot/rules
List alarm rules
Example:
curl https://api.wayscloud.services/v1/iot/rules \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"rules": [
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"severity": "warning",
"is_enabled": true
}
]
}POST /v1/iot/rules
Create alarm rule
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. Rule name |
description | object | Rule description |
rule_type | string | Required. Rule type: missing_data, offline, threshold, message_rate, reconnect_rate |
scope_type | string | Scope: fleet, group, profile, device |
scope_device_id | object | Device ID when scope_type=device |
scope_group_id | object | Group ID when scope_type=group |
scope_profile_id | object | Profile ID when scope_type=profile |
config | object | Required. Rule-type-specific configuration |
severity | string | Alarm severity: critical, warning, info |
actions | array | Actions on trigger: create_alarm, send_webhook, mark_unhealthy |
cooldown_seconds | integer | Minimum seconds between alarm triggers |
is_enabled | boolean | Whether rule is active |
auto_resolve | boolean | Auto-resolve alarm when condition clears |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/rules \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"actions": [
"create_alarm"
],
"config": {
"datapoint_id": "dp-abc123",
"duration_seconds": 300,
"operator": "gt",
"value": 35
},
"name": "High temperature alert",
"rule_type": "threshold",
"severity": "warning"
}'Response:
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"scope_type": "fleet",
"config": {
"datapoint_id": "dp-abc123",
"operator": "gt",
"value": 35,
"duration_seconds": 300
},
"severity": "warning",
"actions": [
"create_alarm"
],
"cooldown_seconds": 300,
"is_enabled": true,
"auto_resolve": false,
"created_at": "2026-02-01T10:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}GET /v1/iot/rules/
Get alarm rule
Example:
curl https://api.wayscloud.services/v1/iot/rules/{rule_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"scope_type": "fleet",
"config": {
"datapoint_id": "dp-abc123",
"operator": "gt",
"value": 35,
"duration_seconds": 300
},
"severity": "warning",
"actions": [
"create_alarm"
],
"cooldown_seconds": 300,
"is_enabled": true,
"auto_resolve": false,
"created_at": "2026-02-01T10:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}PUT /v1/iot/rules/
Update alarm rule
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | |
description | object | |
config | object | |
severity | object | |
actions | object | |
cooldown_seconds | object | |
is_enabled | object | |
auto_resolve | object |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/rules/{rule_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"config": {
"value": 40
},
"severity": "critical"
}'Response:
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"scope_type": "fleet",
"config": {
"datapoint_id": "dp-abc123",
"operator": "gt",
"value": 35,
"duration_seconds": 300
},
"severity": "warning",
"actions": [
"create_alarm"
],
"cooldown_seconds": 300,
"is_enabled": true,
"auto_resolve": false,
"created_at": "2026-02-01T10:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}DELETE /v1/iot/rules/
Delete alarm rule
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/rules/{rule_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"POST /v1/iot/rules/{rule_id}/enable
Enable alarm rule
Example:
curl -X POST https://api.wayscloud.services/v1/iot/rules/{rule_id}/enable \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"scope_type": "fleet",
"config": {
"datapoint_id": "dp-abc123",
"operator": "gt",
"value": 35,
"duration_seconds": 300
},
"severity": "warning",
"actions": [
"create_alarm"
],
"cooldown_seconds": 300,
"is_enabled": true,
"auto_resolve": false,
"created_at": "2026-02-01T10:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}POST /v1/iot/rules/{rule_id}/disable
Disable alarm rule
Example:
curl -X POST https://api.wayscloud.services/v1/iot/rules/{rule_id}/disable \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"name": "High temperature alert",
"rule_type": "threshold",
"scope_type": "fleet",
"config": {
"datapoint_id": "dp-abc123",
"operator": "gt",
"value": 35,
"duration_seconds": 300
},
"severity": "warning",
"actions": [
"create_alarm"
],
"cooldown_seconds": 300,
"is_enabled": true,
"auto_resolve": false,
"created_at": "2026-02-01T10:00:00Z",
"updated_at": "2026-03-20T14:22:00Z"
}GET /v1/iot/alarms
List alarms
Retrieve alarms with optional filtering by status, severity, device, or rule.
Example:
curl https://api.wayscloud.services/v1/iot/alarms \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"alarms": [
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123def",
"device_id": "sensor-001",
"severity": "warning",
"title": "Device offline: sensor-001",
"status": "active",
"triggered_at": "2026-03-30T14:00:00Z",
"occurrence_count": 3
}
],
"total": 12,
"page": 1,
"page_size": 50
}GET /v1/iot/alarms/summary
Get alarm summary
Alarm counts grouped by status and severity.
Example:
curl https://api.wayscloud.services/v1/iot/alarms/summary \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"by_status": {
"active": 8,
"acknowledged": 3,
"resolved": 45
},
"by_severity": {
"critical": 2,
"warning": 7,
"info": 3
},
"active_total": 11
}GET /v1/iot/alarms/
Get alarm details
Example:
curl https://api.wayscloud.services/v1/iot/alarms/{alarm_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123def",
"device_id": "sensor-001",
"rule_id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"rule_name": "High temperature alert",
"severity": "warning",
"title": "Device offline: sensor-001",
"message": "Device has been offline for 5 minutes",
"status": "active",
"triggered_at": "2026-03-30T14:00:00Z",
"occurrence_count": 3,
"acknowledged_at": null,
"resolved_at": null,
"created_at": "2026-03-30T14:00:00Z"
}GET /v1/iot/alarms/{alarm_id}/timeline
Get alarm event timeline
Example:
curl https://api.wayscloud.services/v1/iot/alarms/{alarm_id}/timeline \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
[
{
"id": 1,
"event_type": "triggered",
"actor": "rule_engine",
"note": null,
"metadata": {
"severity": "warning"
},
"created_at": "2026-03-30T14:00:00Z"
},
{
"id": 2,
"event_type": "acknowledged",
"actor": "operator@example.com",
"note": "Investigating",
"metadata": null,
"created_at": "2026-03-30T14:15:00Z"
}
]POST /v1/iot/alarms/{alarm_id}/acknowledge
Acknowledge alarm
Request Body:
| Field | Type | Description |
|---|---|---|
note | object | Optional note |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/alarms/{alarm_id}/acknowledge \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"note": "Investigating — sensor may need recalibration"
}'Response:
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123def",
"device_id": "sensor-001",
"rule_id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"rule_name": "High temperature alert",
"severity": "warning",
"title": "Device offline: sensor-001",
"message": "Device has been offline for 5 minutes",
"status": "active",
"triggered_at": "2026-03-30T14:00:00Z",
"occurrence_count": 3,
"acknowledged_at": null,
"resolved_at": null,
"created_at": "2026-03-30T14:00:00Z"
}POST /v1/iot/alarms/{alarm_id}/resolve
Resolve alarm
Request Body:
| Field | Type | Description |
|---|---|---|
note | object | Optional note |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/alarms/{alarm_id}/resolve \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"note": "Investigating — sensor may need recalibration"
}'Response:
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123def",
"device_id": "sensor-001",
"rule_id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"rule_name": "High temperature alert",
"severity": "warning",
"title": "Device offline: sensor-001",
"message": "Device has been offline for 5 minutes",
"status": "active",
"triggered_at": "2026-03-30T14:00:00Z",
"occurrence_count": 3,
"acknowledged_at": null,
"resolved_at": null,
"created_at": "2026-03-30T14:00:00Z"
}POST /v1/iot/alarms/{alarm_id}/reopen
Reopen a resolved alarm
Request Body:
| Field | Type | Description |
|---|---|---|
note | object | Optional note |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/alarms/{alarm_id}/reopen \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"note": "Investigating — sensor may need recalibration"
}'Response:
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123def",
"device_id": "sensor-001",
"rule_id": "c3d4e5f6-7890-1abc-def2-345678901cde",
"rule_name": "High temperature alert",
"severity": "warning",
"title": "Device offline: sensor-001",
"message": "Device has been offline for 5 minutes",
"status": "active",
"triggered_at": "2026-03-30T14:00:00Z",
"occurrence_count": 3,
"acknowledged_at": null,
"resolved_at": null,
"created_at": "2026-03-30T14:00:00Z"
}GET /v1/iot/datapoints
List datapoint definitions
Example:
curl https://api.wayscloud.services/v1/iot/datapoints \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"datapoints": [
{
"id": "e5f6a7b8-9012-3cde-f456-7890123456ef",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number"
}
]
}POST /v1/iot/datapoints
Create datapoint definition
Request Body:
| Field | Type | Description |
|---|---|---|
key | string | Required. Datapoint key (unique per customer) |
label | object | Human-readable label |
unit | object | Measurement unit |
data_type | string | Data type: number, string, boolean |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/datapoints \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"data_type": "number",
"key": "temperature",
"label": "Temperature",
"unit": "°C"
}'Response:
{
"id": "e5f6a7b8-9012-3cde-f456-7890123456ef",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number",
"aggregation_method": "avg",
"is_chartable": true,
"is_alertable": true,
"created_at": "2026-01-10T12:00:00Z"
}GET /v1/iot/datapoints/
Get datapoint definition
Example:
curl https://api.wayscloud.services/v1/iot/datapoints/{datapoint_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "e5f6a7b8-9012-3cde-f456-7890123456ef",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number",
"aggregation_method": "avg",
"is_chartable": true,
"is_alertable": true,
"created_at": "2026-01-10T12:00:00Z"
}PUT /v1/iot/datapoints/
Update datapoint definition
Request Body:
| Field | Type | Description |
|---|---|---|
label | object | |
unit | object |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/datapoints/{datapoint_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"label": "Ambient Temperature",
"unit": "°C"
}'Response:
{
"id": "e5f6a7b8-9012-3cde-f456-7890123456ef",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number",
"aggregation_method": "avg",
"is_chartable": true,
"is_alertable": true,
"created_at": "2026-01-10T12:00:00Z"
}DELETE /v1/iot/datapoints/
Delete datapoint definition
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/datapoints/{datapoint_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"GET /v1/iot/devices/{device_id}/telemetry
Get device telemetry
Retrieve telemetry data for a device, optionally filtered by datapoint and time range.
Example:
curl https://api.wayscloud.services/v1/iot/devices/{device_id}/telemetry \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
[
{
"datapoint_id": "dp-abc123",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number",
"measured_at": "2026-03-30T09:55:00Z",
"value": 22.5
},
{
"datapoint_id": "dp-def456",
"name": "humidity",
"label": "Humidity",
"unit": "%",
"data_type": "number",
"measured_at": "2026-03-30T09:55:00Z",
"value": 45.2
}
]GET /v1/iot/devices/{device_id}/telemetry/latest
Get latest telemetry values
Example:
curl https://api.wayscloud.services/v1/iot/devices/{device_id}/telemetry/latest \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
[
{
"datapoint_id": "dp-abc123",
"name": "temperature",
"label": "Temperature",
"unit": "°C",
"data_type": "number",
"measured_at": "2026-03-30T09:55:00Z",
"value": 22.5
},
{
"datapoint_id": "dp-def456",
"name": "humidity",
"label": "Humidity",
"unit": "%",
"data_type": "number",
"measured_at": "2026-03-30T09:55:00Z",
"value": 45.2
}
]GET /v1/iot/notifications/channels
List notification channels
Example:
curl https://api.wayscloud.services/v1/iot/notifications/channels \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"channels": [
{
"id": "f6a7b8c9-0123-4def-5678-901234567890",
"name": "Ops Webhook",
"channel_type": "webhook",
"is_enabled": true
}
]
}POST /v1/iot/notifications/channels
Create notification channel
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. Channel name |
channel_type | string | Required. Channel type: email, webhook, slack, teams, sms |
config | object | Required. Channel-type-specific configuration |
is_enabled | boolean | Whether channel is active |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/notifications/channels \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"channel_type": "webhook",
"config": {
"url": "https://example.com/webhooks/iot"
},
"name": "Ops Webhook"
}'Response:
{
"id": "f6a7b8c9-0123-4def-5678-901234567890",
"name": "Ops Webhook",
"channel_type": "webhook",
"config": {
"url": "https://example.com/webhooks/iot"
},
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}GET /v1/iot/notifications/channels/
Get notification channel
Example:
curl https://api.wayscloud.services/v1/iot/notifications/channels/{channel_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "f6a7b8c9-0123-4def-5678-901234567890",
"name": "Ops Webhook",
"channel_type": "webhook",
"config": {
"url": "https://example.com/webhooks/iot"
},
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}PUT /v1/iot/notifications/channels/
Update notification channel
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | |
config | object | |
is_enabled | object |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/notifications/channels/{channel_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"config": {
"url": "https://example.com/webhooks/iot-v2"
}
}'Response:
{
"id": "f6a7b8c9-0123-4def-5678-901234567890",
"name": "Ops Webhook",
"channel_type": "webhook",
"config": {
"url": "https://example.com/webhooks/iot"
},
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}DELETE /v1/iot/notifications/channels/
Delete notification channel
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/notifications/channels/{channel_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"POST /v1/iot/notifications/channels/{channel_id}/test
Send test notification
Example:
curl -X POST https://api.wayscloud.services/v1/iot/notifications/channels/{channel_id}/test \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"success": true,
"message": "Test notification sent successfully",
"channel_id": "ch-abc123"
}GET /v1/iot/notifications/policies
List notification policies
Example:
curl https://api.wayscloud.services/v1/iot/notifications/policies \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"policies": [
{
"id": "a7b8c9d0-1234-5ef6-7890-123456789012",
"name": "Critical alerts to Slack",
"severity_filter": [
"critical"
],
"is_enabled": true
}
]
}POST /v1/iot/notifications/policies
Create notification policy
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. Policy name |
description | object | |
severity_filter | array | Which alarm severities to match |
rule_ids | object | Specific rule IDs to match (null = all rules) |
scope_type | string | Scope: fleet, device, group, profile |
scope_ids | object | IDs within scope (null for fleet) |
event_types | array | Alarm events: triggered, acknowledged, resolved |
channel_ids | array | Required. Channel IDs to deliver to |
cooldown_seconds | integer | Minimum seconds between notifications for same alarm |
is_enabled | boolean | Whether policy is active |
Example:
curl -X POST https://api.wayscloud.services/v1/iot/notifications/policies \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"channel_ids": [
"ch-abc123"
],
"event_types": [
"triggered"
],
"name": "Critical alerts to Slack",
"severity_filter": [
"critical"
]
}'Response:
{
"id": "a7b8c9d0-1234-5ef6-7890-123456789012",
"name": "Critical alerts to Slack",
"severity_filter": [
"critical"
],
"event_types": [
"triggered"
],
"channel_ids": [
"ch-abc123"
],
"cooldown_seconds": 300,
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}GET /v1/iot/notifications/policies/
Get notification policy
Example:
curl https://api.wayscloud.services/v1/iot/notifications/policies/{policy_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"id": "a7b8c9d0-1234-5ef6-7890-123456789012",
"name": "Critical alerts to Slack",
"severity_filter": [
"critical"
],
"event_types": [
"triggered"
],
"channel_ids": [
"ch-abc123"
],
"cooldown_seconds": 300,
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}PUT /v1/iot/notifications/policies/
Update notification policy
Request Body:
| Field | Type | Description |
|---|---|---|
name | object | |
description | object | |
severity_filter | object | |
event_types | object | |
channel_ids | object | |
cooldown_seconds | object | |
is_enabled | object |
Example:
curl -X PUT https://api.wayscloud.services/v1/iot/notifications/policies/{policy_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"cooldown_seconds": 600,
"severity_filter": [
"critical",
"warning"
]
}'Response:
{
"id": "a7b8c9d0-1234-5ef6-7890-123456789012",
"name": "Critical alerts to Slack",
"severity_filter": [
"critical"
],
"event_types": [
"triggered"
],
"channel_ids": [
"ch-abc123"
],
"cooldown_seconds": 300,
"is_enabled": true,
"created_at": "2026-02-01T10:00:00Z"
}DELETE /v1/iot/notifications/policies/
Delete notification policy
Example:
curl -X DELETE https://api.wayscloud.services/v1/iot/notifications/policies/{policy_id} \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"GET /v1/iot/notifications/deliveries
List notification deliveries
Delivery history with optional filtering by channel type and status.
Example:
curl https://api.wayscloud.services/v1/iot/notifications/deliveries \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"deliveries": [
{
"id": "b8c9d0e1-2345-6f78-9012-345678901234",
"channel_type": "webhook",
"status": "delivered",
"sent_at": "2026-03-30T14:05:00Z"
}
],
"total": 25,
"limit": 50,
"offset": 0
}GET /v1/iot/credentials
Get MQTT connection info
Returns MQTT broker connection details. Per-device credentials are provided at registration.
Example:
curl https://api.wayscloud.services/v1/iot/credentials \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"mqtt_broker": {
"host": "mqtt.wayscloud.services",
"port": 1883,
"tls_port": 8883,
"websocket_port": 8083,
"protocol": "mqtt"
}
}GET /v1/iot/subscription
Get IoT subscription
Returns current plan, device limit, and usage.
Example:
curl https://api.wayscloud.services/v1/iot/subscription \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"plan": "iot-50",
"status": "active",
"device_limit": 50,
"device_count": 12,
"created_at": "2026-01-01T00:00:00Z"
}GET /v1/iot/usage
Get usage statistics
Returns message counts, data usage, and device activity for the current billing period.
Example:
curl https://api.wayscloud.services/v1/iot/usage \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"messages_today": 4521,
"messages_this_month": 142000,
"data_points_today": 18000,
"data_points_this_month": 560000
}GET /v1/iot/stats
Get platform statistics
Overview stats: total devices, active, connected, messages, data usage.
Example:
curl https://api.wayscloud.services/v1/iot/stats \
-H "X-API-Key: wayscloud_iot_abc12_YOUR_SECRET"Response:
{
"total_devices": 42,
"active_devices": 39,
"connected_now": 38,
"messages_24h": 62000,
"data_points_24h": 248000,
"active_alarms": 3
}