Command APIs

Send command to multiple devices

Send a command with provided data to multiple devices. Command could be any supported command such as send message command, install package command, OTA and more. Returns metadata about the sent command.

post/rest/command/send/sendcommanddatatomany

Request

  • Base URL
    https://masonconsole.com
  • Auth
    HTTP bearer

Request body

deviceIdsstring[]

IDs of the devices that will receive the command

Example request

{
  "commandData": {
    "intentAction": "com.example.MY_ACTION",
    "packageName": "com.receiverapp.package",
    "componentName": "com.receiverapp.package.YourReceiver",
    "declaredPermission": "com.yourapp.CUSTOM_BROADCAST_PERMISSION",
    "intentExtras": {
      "key1": "value1",
      "key2": "value2"
    },
    "waitForResponse": true
  },
  "deviceIds": [
    "device_id_1",
    "device_id_2"
  ]
}

Response

Successful response

resultstring

The result of the login operation. Should be either 'SUCCESS' or 'FAILURE'.

messagestring

The message associated with the login response (applicable in case of 'FAILURE').

@classstring required

Example response

{
  "data": {
    "commandId": "command123"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.