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

Limits

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 QueryDeviceOriginalPropertyStatus

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

Asc Integer Yes 0

The chronological order in which property data is queried. Valid values:

  • 0: in reverse chronological order.
  • 1: in chronological order.
PageSize Integer Yes 10

The number of entries to return on each page. Valid values: 1 to 50.

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

The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

For more information, see Overview.

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 a combination of the ProductKey and DeviceName parameters at the same time, the IotId parameter takes precedence.

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

Response parameters

Parameter Type Example Description
Code String iot.common.InvalidPageParams

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

Data Struct

The data returned if the call succeeds. For more information, see the parameters of the List parameter.

List Array of PropertyStatusDataInfo

The array of property information. The information about each property is indicated by the PropertyStatusInfo parameter.

PropertyStatusDataInfo
Identifier String Temperture

The identifier of the property.

Time Long 1517553572362

The time when the property was modified, in milliseconds.

Value String 26

The value of the property.

NextPageToken String Bo***x44Qx

The identifier of the next page.

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 query. This allows you to query the data that is not returned by the current query.

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=QueryDeviceOriginalPropertyStatus
&Asc=0
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<QueryDeviceOriginalPropertyStatusResponse>
  <Data>
        <NextValid>false</NextValid>
        <nextPageToken>Bo***x44Qx</nextPageToken>
        <List>
              <PropertyStatusInfo>
                    <Value>48</Value>
                    <Time>1579249151178</Time>
                    <Identifier>Humidity</Identifier>
              </PropertyStatusInfo>
              <PropertyStatusInfo>
                    <Value>32.46</Value>
                    <Time>1579249151178</Time>
                    <Identifier>Temperature</Identifier>
              </PropertyStatusInfo>
        </List>
  </Data>
  <RequestId>84BAD25B-9879-4BA1-9213-F576C6558D77</RequestId>
  <Success>true</Success>
</QueryDeviceOriginalPropertyStatusResponse>

JSON format

{
    "Data": {
        "NextValid": false, 
        "nextPageToken": "Bo***x44Qx", 
        "List": {
            "PropertyStatusInfo": [
                {
                    "Value": "48",
                    "Time": "1579249151178",
                    "Identifier": "Humidity"
                },
                {
                    "Value": "32.46",
                    "Time": "1579249151178",
                    "Identifier": "Temperature"
                }
            ]
        }
    },
    "RequestId": "84BAD25B-9879-4BA1-9213-F576C6558D77",
    "Success": true
}

Error codes

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