Tarsheed
  1. Automation
Tarsheed
  • Auth
    • Create Account
      POST
    • Verifiy Email
      POST
    • Login
      POST
    • Resend Verfication Code
      POST
    • Forget Password Request
      POST
    • Forget password Verify Code
      POST
    • Reset Password
      PATCH
    • Login With Google
      POST
    • Login With Facebook
      POST
  • Users
    • Get all users
      GET
    • Get specific user
      GET
    • Delete user account
      DELETE
    • Update user data
      PUT
    • Change user password
      PUT
    • Get Recomendation
      GET
    • Get Avarage Cost For Spesfic User
      GET
    • Get The Power Saving Modes Settings
      GET
    • Update the Usage of the power saving mode
      PATCH
  • Reports
    • GetUserReport
      GET
  • Room
    • Create New Room
      POST
    • Update Room
      PATCH
    • Delete Room
      DELETE
    • Get Room Details
      GET
    • Get all Rooms for spesfic user
      GET
  • Device
    • Create New Device
    • Update Device
    • Delete Device
    • Get All Devices id For IOT System
    • Toggle Device Status
  • category
    • get all categories
  • Sensor
    • Create New Sensor
    • Update Sensor
    • Delete Sensor
    • Get All Sensor For Spesfic user
  • Automation
    • Add New Automation
      POST
    • Get all Automation for Spesfic User
      GET
    • Delete Spesfic Automation
      DELETE
    • Update Spesfic Automation
      PATCH
    • Apply Automation Manually
      POST
  1. Automation

Get all Automation for Spesfic User

Developing
GET
/automation/get
Automation
This Endpoint used to get all automations for spesfic user

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
        }
    ]
}
Previous
Add New Automation
Next
Delete Spesfic Automation
Built with