Tarsheed
  1. Device
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
      POST
    • Update Device
      PATCH
    • Delete Device
      DELETE
    • Get All Devices id For IOT System
      GET
    • Toggle Device Status
      PATCH
  • category
    • get all categories
  • Sensor
    • Create New Sensor
    • Update Sensor
    • Delete Sensor
    • Get All Sensor For Spesfic user
  • Automation
    • Add New Automation
    • Get all Automation for Spesfic User
    • Delete Spesfic Automation
    • Update Spesfic Automation
    • Apply Automation Manually
  1. Device

Get All Devices id For IOT System

Developing
GET
device/getAll/{userId}
Deviceget
This Endpoint used for get all devices used by the IOT System and return devices id and ist pin number for spesfic user

Request

Path Params
userId
string 
required
Example:
679e83f48e118c4079b251c3
Header Params
Authorization
string 
optional
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3OWU4M2Y0OGUxMThjNDA3OWIyNTFjMyIsImVtYWlsIjoiYWxpaXNtYWlsaDA4QGdtYWlsLmNvbSIsInJvbGUiOiJjdXN0b21lciIsImlhdCI6MTc0MTI0MjUwMiwiZXhwIjoxNzQzODM0NTAyfQ.ABNTRtJ6iJn1AJpPKcUrr1SOW2aYXRjRkn0Vv1YURoI

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 'device/getAll/679e83f48e118c4079b251c3' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3OWU4M2Y0OGUxMThjNDA3OWIyNTFjMyIsImVtYWlsIjoiYWxpaXNtYWlsaDA4QGdtYWlsLmNvbSIsInJvbGUiOiJjdXN0b21lciIsImlhdCI6MTc0MTI0MjUwMiwiZXhwIjoxNzQzODM0NTAyfQ.ABNTRtJ6iJn1AJpPKcUrr1SOW2aYXRjRkn0Vv1YURoI'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
    "devices": [
        {
            "_id": "67d8ef36ae78368e1f172220",
            "name": "Television",
            "description": "main TV in the house",
            "categoryId": "67cd8ab3eff1c5c8a7793c51",
            "status": "OFF",
            "pinNumber": 2,
            "roomId": "67d7ade73adb097a01018dd0"
        },
        {
            "_id": "67d8f19e3e1d7e7475d86628",
            "name": "Smart Fan",
            "description": "WiFi controlled ceiling fan",
            "pinNumber": 4,
            "roomId": "67d7ade73adb097a01018dd3",
            "categoryId": "67cd8ab3eff1c5c8a7793c51",
            "status": "OFF"
        },
        {
            "_id": "67d8f19e3e1d7e7475d86625",
            "name": "Smart Light",
            "description": "LED bulb with smart control",
            "pinNumber": 1,
            "roomId": "67d7ade73adb097a01018dd0",
            "categoryId": "67cd8a1aeff1c5c8a7793c4e"
        },
        {
            "_id": "67d8f19e3e1d7e7475d86626",
            "name": "Smart Plug",
            "description": "Power plug with remote access",
            "pinNumber": 2,
            "roomId": "67d7ade73adb097a01018dd1",
            "categoryId": "67cd8a5aeff1c5c8a7793c4f"
        },
        {
            "_id": "67d8f19e3e1d7e7475d86627",
            "name": "Thermostat",
            "description": "Temperature controller",
            "pinNumber": 3,
            "roomId": "67d7ade73adb097a01018dd2",
            "categoryId": "67cd8a81eff1c5c8a7793c50"
        },
        {
            "_id": "67d8f19e3e1d7e7475d8662a",
            "name": "Smart Door Lock",
            "description": "Keyless entry lock",
            "pinNumber": 6,
            "roomId": "67d7ade73adb097a01018dd1",
            "categoryId": "67cd8a81eff1c5c8a7793c50"
        },
        {
            "_id": "67d8f19e3e1d7e7475d8662c",
            "name": "Water Leak Detector",
            "description": "Detects water leaks",
            "pinNumber": 8,
            "roomId": "67d7ade73adb097a01018dd3",
            "categoryId": "67cd8a1aeff1c5c8a7793c4e"
        },
        {
            "_id": "67d8f19e3e1d7e7475d8662e",
            "name": "Smart Speaker",
            "description": "Voice-controlled speaker",
            "pinNumber": 10,
            "roomId": "67d7ade73adb097a01018dd1",
            "categoryId": "67cd8ab3eff1c5c8a7793c51"
        },
        {
            "_id": "67d8f19e3e1d7e7475d86629",
            "name": "Smart Camera",
            "description": "Security camera with night vision",
            "pinNumber": 5,
            "roomId": "67d7ade73adb097a01018dd0",
            "categoryId": "67cd8a5aeff1c5c8a7793c4f"
        },
        {
            "_id": "67d8f19e3e1d7e7475d8662b",
            "name": "Motion Sensor",
            "description": "Detects movement in the room",
            "pinNumber": 7,
            "roomId": "67d7ade73adb097a01018dd2",
            "categoryId": "67cd8ab3eff1c5c8a7793c51"
        },
        {
            "_id": "680cfc63e4156a75796e0fcc",
            "name": "TV",
            "description": "main TV in the house",
            "categoryId": "67cd8ab3eff1c5c8a7793c51",
            "status": "OFF",
            "pinNumber": 7,
            "priority": 3,
            "roomId": "67d7ade73adb097a01018dd0"
        }
    ]
}
Previous
Delete Device
Next
Toggle Device Status
Built with