IotHub
  1. command
IotHub
  • README
  • token
    • createToken
      POST
    • destroyToken
      POST
  • customer
    • customerPage
      POST
    • customerTree
      POST
  • device
    • command
      • commandSend
        POST
      • commandInfoList
        POST
      • cutOilElectric
        POST
      • getConfig
        POST
    • devicePage
      POST
    • deviceTypes
      POST
    • deviceTypeInfo
      POST
    • deviceDataByDeviceIds
      POST
    • deviceDataByCustomerId
      POST
    • deviceTripInfoByTripId
      POST
    • deviceTripsByDeviceId
      POST
    • deviceTraffic
      POST
    • deviceSensorData
      POST
    • expandInfoByDeviceId
      POST
    • saveDeviceChannelName
      POST
  • fence
    • fencePage
      POST
    • fenceInfo
      POST
    • addFence
      POST
    • saveFence
      POST
    • delFence
      POST
    • fenceDevices
      POST
    • fenceDeviceUpdate
      POST
    • fenceDeviceDel
      POST
    • fenceDeviceAdd
      POST
  • push&Webhook
    • README
  • video
    • H5 page
    • H5 Page-V2
    • history
      • README
      • playBackList
      • historicalUpload
      • playBack
      • replaySet
      • taskPage
      • taskStop
      • taskDelete
    • live
      • liveVideo
      • liveVideoControl
    • getNodes
  • alarm
    • Alert Types
    • alarmTypeList
    • alarmFilePage
    • alarmFileByAlarmId
    • alarmHistoryPage
    • alarmPageByUser
  • audio
    • README
    • talk「Deprecated」
    • talkPlus
  • gallery
    • filePageV2
    • filePage
    • deleteFile
    • capture
    • capturePage
    • captureRecord
  • fleet
    • faceRecordPage
    • rfidPage
  • gps
    • historyData
  • Protocol Analysis
    POST
  1. command

commandSend

POST
/v2/openapi/device/command/send

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Header Params

Body Params application/json

Example
{
    "deviceId": "string",
    "commandText": "string",
    "subProtocol": "string",
    "type": "string"
}

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 'https://mettahub.mettaxiot.com/gps/v2/openapi/device/command/send' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "deviceId": "string",
    "commandText": "string",
    "subProtocol": "string",
    "type": "string"
}'

Responses

🟢200Success
application/json
Body

Example
{
  "code": 0,
  "data": "",
  "msg": ""
}
Modified at 2025-09-12 09:52:04
Previous
customerTree
Next
commandInfoList
Built with