Creates new device command.

Request

HTTP Request

POST /device/{deviceId}/command

Parameters

Parameter NameRequiredTypeDescription
deviceIdYesstringDevice unique identifier.

Authorization

Access JSON Web Token (CreateDeviceCommand)

Request Body

In the request body, supply a DeviceCommand resource.

Property NameRequiredTypeDescription
commandYesstringCommand name.
timestampNodatetimeCommand UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
parametersNoobjectCommand parameters, a JSON object with an arbitrary structure.
lifetimeNointegerCommand lifetime, a number of seconds until this command expires.
statusNostringCommand status, as reported by device or related infrastructure.
resultNoobjectCommand 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 NameTypeDescription
idintegerCommand identifier.
timestampdatetimeCommand UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
lastUpdateddatetimeLast command update UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
userIdintegerAssociated user identifier.