ZenSpace
  1. light
ZenSpace
  • ZenSpace Integration Documentation
  • ZenSpace General Architecture - Overview
  • ZenSpace API V1.0
    • Device Management
      • lock
        • Get Device Status
        • Subscribe to Device Events
        • Action on IoT Device
        • Get Device Control
      • camera
        • Get Device Status
        • Subscribe to Device Events
        • Action on IoT Device
        • Get Device Instruction
        • Get Device Control
      • light
        • Get Device Instruction
        • Get Device Status
        • Subscribe to Device Events
        • Action on IoT Device
        • Get Device Control
      • fan
        • Get Device Status
        • Subscribe to Device Events
        • Action on IoT Device
        • Get Device Instruction
        • Get Device Control
      • o3-sensor
        • temprature
          • Subscribe to Device Events Copy Copy
          • Get Device Status
        • buzzer
          • Get Device Status Copy
          • Action on IoT Device
        • occupancy
          • Get Device Status
        • ring-light
          • Action on IoT Device
          • Get Device Status
        • Get Device Instruction
        • Get Device Status
        • Subscribe to Device Events
        • Action on IoT Device
        • Get Device Control
      • meeting-room-display
        • Get Device Status
      • Get Device Instruction Copy
      • Fetch Associated Device Types
    • Bookings
      • Create, Update, or Cancel a Booking
      • Bulk Booking Operation
      • Check-in Operation
    • Meeting Space
      • Store Meeting Space Availability
      • Get the list of meeting spaces.
      • Get the state of a specific meeting space.
  • ZenSpace API V2.0
    • Device Management
      • lock
        • Get Device Control
        • Action on IoT Device
        • Subscribe to Device Events
        • Get Device Status
      • camera
        • Subscribe to Device Events
        • Get Device Control
        • Get Device Instruction
        • Action on IoT Device
        • Get Device Status
      • light
        • Get Device Status
          POST
        • Subscribe to Device Events
          GET
        • Get Device Instruction
          POST
        • Get Device Control
          POST
        • Action on IoT Device
          POST
      • fan
        • Get Device Instruction
        • Get Device Control
        • Action on IoT Device
        • Subscribe to Device Events
        • Get Device Status
      • o3-sensor
        • temprature
          • Get Device Status
          • Subscribe to Device Events Copy Copy
        • buzzer
          • Action on IoT Device
          • Get Device Status Copy
        • occupancy
          • Get Device Status
        • ring-light
          • Get Device Status
          • Action on IoT Device
        • Action on IoT Device
        • Get Device Control
        • Subscribe to Device Events
        • Get Device Status
        • Get Device Instruction
      • meeting-room-display
        • Get Device Status
      • Fetch Associated Device Types
        GET
      • Get Device Instruction Copy
        GET
    • Bookings
      • Check-in Operation
      • Bulk Booking Operation
      • Create, Update, or Cancel a Booking
    • Meeting Space
      • Get the state of a specific meeting space.
      • Get the list of meeting spaces.
      • Store Meeting Space Availability
  • ZenSpace Supported Devices
    • ZenSpace Device Integration
  1. light

Action on IoT Device

Developing
POST
/api/devices/{meeting_space_id}/action
Trigger an action on a specific IoT device based on its type.

Request

Path Params

Body Params application/json

Example
{
    "device_type": "lock",
    "parameters": {
        "action": "unlock"
    }
}

Request Code 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 POST '/api/devices//action' \
--header 'Content-Type: application/json' \
--data-raw '{
    "device_type": "lock",
    "parameters": {
        "action": "unlock"
    }
}'

Responses

🟢200OK
application/json
Action triggered successfully.
Body

Example
{
    "status": "success",
    "response": "Lock has been triggered successfully."
}
🟠400Bad Request
🟠404Record Not Found
🔴500Server Error
Modified at 2025-05-09 12:02:11
Previous
Get Device Control
Next
fan
Built with