docs.zenspace.io
  1. RaspberryPi
docs.zenspace.io
  • 🧭 Introduction
  • 🧱 System Components
  • 🧰 Tech Stack
  • 🏗️ System Architecture
  • 🌐 Deployment Architecture
  • 🗄️ Database Design Documentation
  • API Endpoints
    • RaspberryPi
      • Heartbeat API
        GET
      • Retrieve all active sensors and device permissions
        GET
      • Control a device (e.g., turn on/off, adjust intensity)
        POST
      • Enable or disable a device
        POST
      • Register a meeting space ID and retrieve network details
        POST
    • Meeting Space
      • Schedule meeting space state
      • Get meeting spaces by customer
      • Get meeting space state by ID
      • Get meeting space state by device ID
      • Disable meeting space state
      • Send meeting space state by meeting space ID
      • Store meeting space availability
      • Create Google Calendar
    • Device Management
      • Create device
      • Create device sensors
      • Create or update admin unlock codes
      • Upload meeting space screenshot
    • Authentication
      • Create authorization token
    • Messaging
      • Send message to Android device
    • Booking
      • Send meeting space state by booking ID
      • Create or update booking
  1. RaspberryPi

Enable or disable a device

POST
/device_access/
RaspberryPi
Last modified:2025-05-29 12:54:08
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/device_access/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "device_id": 32,
    "operationType": false,
    "operationUser": true
}'
Response Response Example
{
    "success": true,
    "message": "Device access updated successfully.",
    "updated_device": {
        "id": 28,
        "Module_Name": "Lock",
        "Device_Name": "Lock",
        "Device_No": 2,
        "Sensor_Data_Id": 14,
        "Sensor_Name": "lock2",
        "Button_Id": "lock2Toggle",
        "Operation_Type": 1,
        "Intensity": 0,
        "Operation_User": 1,
        "Current_Value": 1,
        "Date_Time": "2025-05-26T11:09:43.663Z"
    }
}

Request

Body Params application/json
device_id
integer 
required
Example:
32
operationType
boolean 
required
Example:
false
operationUser
boolean 
required
Example:
true
Examples

Responses

🟢200OK
application/json
Device access update response
Body
success
boolean 
optional
Example:
true
message
string 
optional
Example:
Device access updated successfully.
updated_device
object (DevicePermission) 
optional
id
integer 
optional
Example:
28
Module_Name
string 
optional
Example:
Lock
Device_Name
string 
optional
Example:
Lock
Device_No
integer 
optional
Example:
2
Sensor_Data_Id
integer 
optional
Example:
14
Sensor_Name
string 
optional
Example:
lock2
Button_Id
string 
optional
Example:
lock2Toggle
Operation_Type
integer 
optional
Example:
1
Intensity
integer 
optional
Example:
0
Operation_User
integer 
optional
Example:
1
Current_Value
integer 
optional
Example:
1
Date_Time
string <date-time>
optional
Example:
2025-05-26T11:09:43.663Z
Previous
Control a device (e.g., turn on/off, adjust intensity)
Next
Register a meeting space ID and retrieve network details
Built with