property.publish

The property.publish command is used to publish property data (typically sensor data) for a thing.  

For more information about properties see Defining Properties.

TR50 Request


{
  "cmd": {
    "command": "property.publish",
    "params": {
      "thingKey": "mything",
      "key": "myprop",
      "value": 123.44,
      "ts": "2014-04-05T02:03:04.322Z",
      "corrId": "mycorrid",
      "aggregate":true
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

 

Thing Identifier Parameters

 

Identifies the thing to which the property data is to be associated. If omitted, the thingKey associated with your session will be used. See Thing Identifier Parameters table below for supported parameters.

key

String

Yes

The key for the property that you wish to publish.

value

Float

Yes

The value to publish.

ts

String

 

The timestamp in which the value was recorded.

aggregate

Boolean

 

If 'true', then aggregate data (hourly and daily) will be generated for the values published in this API call, if 'false' only the history will be saved. If not set, then the Calculate aggregates parameter in the property definition in the thing definition for the thing is used.

corrId

String

 

A correlation ID that can be used when querying to find related data objects.

Thing Identifier Parameters

Name

Type

Description

thingKey

String

Key of the thing

thingId

String

Id of the thing

esn

String

Esn of the thing

iccid

String

Iccid of the thing

imei

String

Imei of the thing

imsi

String

Imsi of the thing

meid

String

Meid of the thing

msisdn

String

Msisdn of the thing

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.


{
  "cmd": {
    "success": true
  }
}