Queries the original property records that are submitted by a specified device. These records include properties that are verified and not verified by a specified Thing Specification Language (TSL) model.

Limits

  • You can query property data that is generated within the last 30 days.
Note The data of a property is stored from the day when the property data was generated.
  • Each Alibaba Cloud account can run a maximum of 50 queries per second (QPS).
    Note Resource Access Management (RAM) users of an Alibaba Cloud account share the quota of the account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes QueryDeviceOriginalPropertyData

The operation that you want to perform. Set the value to QueryDeviceOriginalPropertyData.

Asc Integer Yes 0

The sorting order of the returned property records. Valid values:

  • 0: descending.
  • 1: ascending.
Note The start time must be earlier than the end time. The system sorts the returned records based on the specified order.
EndTime Long Yes 1579249499000

The end of the time range to query. The value must be a 13-digit timestamp.

Identifier String Yes temperature

The identifier of the property.

  • If low-level verification is applied, you can perform the following steps to view the Identifier of a device event: Log on to the IoT Platform console and go to the Define Feature tab of the Product Details page. You can also call the QueryThingModel operation and view the service identifier in the returned TSL data.
  • If no verification is applied, the value must be the same as the value of the custom identifier that is submitted by the device.
PageSize Integer Yes 10

The maximum number of records that are returned for each property. Maximum value: 100.

The number of records that are returned for an arbitrary property cannot exceed the limit.

StartTime Long Yes 1579249499000

The start of the time range to query. The value must be a 13-digit timestamp.

IotInstanceId String No iot_instc_pu****_c*-v64********

The instance ID. This parameter is not required for public instances. However, this parameter is required for Enterprise Edition instances that you have purchased.

ProductKey String No a1BwAGV****

The ProductKey of the product to which the device belongs.

Note If you specify this parameter, you must also specify the DeviceName parameter.
DeviceName String No light

The name of the device.

Note If you specify this parameter, you must also specify the ProductKey parameter.
NextPageToken String No Bo***x44Qx

The identifier of the next page. If the next page exists, this parameter is returned. In this case, you must add the value of the parameter to the next request.

IotId String No Q7uOhVRdZRRlDnTLv****00100

The ID of the device. It is the unique identifier that IoT Platform generated for the device.

Note If you specify this parameter, you do not need to specify the ProductKey or DeviceName parameter. The IotId parameter specifies a unique identifier for the device, and corresponds to a combination of the ProductKey and DeviceName parameters. If you specify the IotId parameter and the combination of the ProductKey and DeviceName parameters at the same time, only the IotId parameter is used.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this API operation. For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
Code String iot.device.InvalidIoTId

The error code returned if the call fails. For more information, see Error codes.

Data Struct

The property data returned if the call succeeds.

List Array of PropertyInfo

The list of properties. Each element indicates a property.

PropertyInfo
Time String 1516541885630

The time when the property was modified.

Value String 2

The value of the property.

NextValid Boolean true

Indicates whether the next page exists.

  • true: The next page exists.
  • false: The next page does not exist.

If the value true is returned, you can add the value of the NextPageToken parameter to the next request. This allows you to query the data that is not included in the current query.

nextPageToken String Bo***x44Qx

The identifier of the next page.

ErrorMessage String A system exception has occurred.

The error message returned if the call fails.

RequestId String E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

The ID of the request.

Success Boolean true

Indicates whether the call succeeds.

  • true: The call succeeded.
  • false: The call failed.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/? Action=QueryDeviceOriginalPropertyData
&Asc=0
&EndTime=1579249499000
&Identifier=temperature
&PageSize=10
&StartTime=1579249499000
&<Common request parameters>

Sample success responses

XML format

<QueryDeviceOriginalPropertyDataResponse>
  <Data>
        <NextValid>false</NextValid>
        <nextPageToken>Bo***x44Qx</nextPageToken>
        <List>
              <PropertyInfo>
                    <Value>32.46</Value>
                    <Time>1579249151178</Time>
              </PropertyInfo>
        </List>
  </Data>
  <RequestId>45391E10-446B-4986-863E-1BA8CC44748F</RequestId>
  <Success>true</Success>
</QueryDeviceOriginalPropertyDataResponse>

JSON format

{
  "Data": {
    "NextValid": false, 
    "nextPageToken": "Bo***x44Qx", 
    "List": {
      "PropertyInfo": [
        {
          "Value": "32.46", 
          "Time": 1579249151178
        }
      ]
    }
  }, 
  "RequestId": "45391E10-446B-4986-863E-1BA8CC44748F", 
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.