- Auth
- Users
- Reports
- Room
- Device
- category
- Sensor
- Automation
Get all Automation for Spesfic User
Developing
GET
/automation/get
Automation
Request
Header Params
Authorization
string
optional
Example:
token
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/automation/get' \
--header 'Authorization: token'
Responses
🟢200Success
application/json
Body
object {0}
Example
{
"automations": [
{
"_id": "681a77a528d6e82084e50dc2",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SENSOR",
"sensorId": null,
"value": 30
}
],
"actions": [
{
"data": {
"title": "High Temperature Warning",
"message": "The temperature is too high!"
},
"type": "NOTIFICATION"
},
{
"data": {
"deviceId": null,
"state": "turn_off"
},
"type": "DEVICE"
}
],
"conditions": [
{
"type": "DEVICE",
"deviceId": null,
"state": "turn_on"
}
],
"createdAt": "2025-05-06T20:57:09.532Z",
"updatedAt": "2025-05-06T20:57:09.532Z",
"__v": 0
},
{
"_id": "6822a355f5451751b0c737f0",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SENSOR",
"sensorId": null,
"value": 30
}
],
"actions": [
{
"data": {
"title": "Temperature Alert",
"message": "The temperature has reached 30°C."
},
"type": "NOTIFICATION"
}
],
"conditions": [
{
"type": "DEVICE",
"deviceId": null,
"state": "on"
}
],
"createdAt": "2025-05-13T01:41:41.136Z",
"updatedAt": "2025-05-13T01:41:41.136Z",
"__v": 0
},
{
"_id": "6822a3c8f5451751b0c737f2",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SCHEDULE",
"sensorId": null,
"value": "08:00"
}
],
"actions": [
{
"data": {
"deviceId": null,
"state": "turn_on"
},
"type": "DEVICE"
}
],
"conditions": [
{
"type": "SENSOR",
"deviceId": null,
"state": "inactive"
}
],
"createdAt": "2025-05-13T01:43:36.634Z",
"updatedAt": "2025-05-13T01:43:36.634Z",
"__v": 0
},
{
"_id": "6822a401f5451751b0c737f4",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SENSOR",
"sensorId": null,
"value": 40
}
],
"actions": [
{
"data": {
"deviceId": null,
"state": "turn_on"
},
"type": "DEVICE"
}
],
"conditions": [
{
"type": "DEVICE",
"deviceId": null,
"state": "off"
}
],
"createdAt": "2025-05-13T01:44:33.857Z",
"updatedAt": "2025-05-13T01:44:33.857Z",
"__v": 0
},
{
"_id": "6822a41ef5451751b0c737f6",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SCHEDULE",
"sensorId": null,
"value": "18:00"
}
],
"actions": [
{
"data": {
"title": "Evening Reminder",
"message": "It's 6 PM, time to turn off devices."
},
"type": "NOTIFICATION"
}
],
"conditions": [
{
"type": "SENSOR",
"deviceId": null,
"state": "active"
}
],
"createdAt": "2025-05-13T01:45:02.634Z",
"updatedAt": "2025-05-13T01:45:02.634Z",
"__v": 0
},
{
"_id": "6822a439f5451751b0c737f8",
"userId": "680a9b2dcdf756b0e0909dde",
"triggers": [
{
"type": "SENSOR",
"sensorId": null,
"value": 25
}
],
"actions": [
{
"data": {
"deviceId": null,
"state": "turn_on"
},
"type": "DEVICE"
}
],
"conditions": [
{
"type": "SENSOR",
"deviceId": null,
"state": "inactive"
}
],
"createdAt": "2025-05-13T01:45:29.468Z",
"updatedAt": "2025-05-13T01:45:29.468Z",
"__v": 0
}
]
}