Getting Started
Official Site
Getting Started
Official Site
  • Document description
  • Read before you start

  • Light application development guide

  • Mobile application development guide

  • Cloud live development guide

  • Desktop application development guide

  • Third party development guide

  • Message push development guide

  • IoT things data model

  • HTTP interface

    • Development specification
    • API privacy policy
    • Postman interface simulation call
    • accessToken: Get administrator token
    • API request example
    • Account docking
    • Push configuration
    • Cloud storage service
    • Equipment management

    • Device configurat

      • Device wifi configuration
      • Equipment dynamic inspection configuration
      • Device storage configuration
      • Device enable configuration
        • setDeviceCameraStatus: Set device enable switch
        • getDeviceCameraStatus: Get device enable switch status
      • Device collection point configuration
      • Device cruise configuration
      • Device video screen configuration
      • Device recording configuration
      • Device Operation
      • Daylight saving time configuration
    • Video equipment

    • Device message
    • Device live broadcast
    • Device lock access
  • Reference documents

On this page
Function details
Request address
Minimum permissions required for sub-account token request
Incoming parameter description
Sample input
Return data field description
Sample output

Set Device Camera Status - Set Device Enable Switch - Imou Open Platform

setDeviceCameraStatus: Set device enable switch

Function details

Set the device enable switch.

Note: Only devices with accessType=PaaS in the device details are supported

Request address

https://openapi-[DataCenter].easy4ip.com/openapi/setDeviceCameraStatus

Minimum permissions required for sub-account token request

"Permission":"Config" "Resource":"cam:serial number:channel number"

Incoming parameter description

Parameter nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator or sub-account accessToken
deviceIdStringYesDevice serial number
channelIdStringNoIf the enableType is device-level enable, there is no need to pass the channel number, and the channel-level enable needs to pass the channel numberchannel number
enableTypeStringYesPlease refer to "Device Capability Switch Description" for details, the first letter is lowercaseDevice enable type
enableBooleanyestrue: enable enable; false: disable enableIs it effective (on or off)

Sample input

{
    "system":{
        "ver":"1.0",
        "appId":"lcdxxxxxxxxx",
        "sign":"47bfb3dae3cbe1420d85d0902666c938",
        "time":1603353544,
        "nonce":"de9af038-97ed-4742-881d-6aa23effb4fc"
    },
    "id":"1254dfe5-bd59-4b8d-8a11-7ab4ba84def3",
    "params":{
        "enableType":"closeCamera",
        "enable":true,
        "deviceId":"TESTQWERXXXX",
        "channelId":"0",
        "token":"At_00000ad9e6e87f0142eb92e207aec46a"
    }
}

Return data field description

No data returned

Sample output

{
  "result":{
    "msg":"The operation was successful.",
    "code":"0"
  },
  "id":"d5c287b4-5b2f-4f03-baf5-8032c5c354af"
}
deviceSdcardStatus: Get device SD card status
getDeviceCameraStatus: Get device enable switch status