Device Connectivity Made Easy

Focus on your product and innovation and leave communication and management to DeviceHive.

Get Started

Creates new device command.

Request

HTTP Request

POST /device/{deviceId}/command

Parameters

Parameter Name

Required

Type

Description

deviceId

Yes

string

Device unique identifier.

Authorization

Access JSON Web Token (CreateDeviceCommand)

Request Body

In the request body, supply a DeviceCommand resource.

Property Name

Required

Type

Description

command

Yes

string

Command name.

timestamp

No

datetime

Command UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).

parameters

No

object

Command parameters, a JSON object with an arbitrary structure.

lifetime

No

integer

Command lifetime, a number of seconds until this command expires.

status

No

string

Command status, as reported by device or related infrastructure.

result

No

object

Command execution result, an optional value that could be provided by device.

Response

If successful, this method returns a DeviceCommand resource in the response body.

Property Name

Type

Description

id

integer

Command identifier.

timestamp

datetime

Command UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).

lastUpdated

datetime

Last command update UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).

userId

integer

Associated user identifier.

Updated 3 years ago

insert


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.