Call this operation to query the list of rules by page.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to ListRule.
PageSize Integer Yes The number of rules per page displayed in the response. The maximum value is 100. The default value is 10.
CurrentPage Integer Yes The page number of returned results to be displayed. The maximum value is 1000. The default value is 1.
Common request parameters - Yes See Common parameters.

Response parameters

Parameter Type Description
RequestId String The globally unique ID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String The error message returned when the call fails.
Code String The error code returned when the call fails. For more information about error codes, see Error codes.
Data RuleInfo The rule information returned when the call is successful. See the following table RuleInfo.
Note The rules are listed in reverse chronological order.
PageSize Integer The number of rules displayed per page.
Page Integer The current page number.
Total Integer The total number of pages.
Table 1. RuleInfo
Parameter Type Description
CreateUserId Long The ID of the user who created this rule.
Created String The CST time when the rule was created.
DataType String The data type of the rule. Values include: JSON and BINARY.
Id Long The rule ID.
Modified String The last time when this rule was updated.
Name String The rule name.
ProductKey String The unique identifier of the product that uses this rule.
RuleDesc String The description of this rule.
Select String The value of SELECT field in the SQL statement of the rule.
ShortTopic String The specific topic (does not contain the ProductKey hierarchy) to which this rule applies. A ShortTopic is in the following format: ${deviceName}/topicShortName. ${deviceName} is the name of the specified device. topicShortName is the custom topic category hierarchy of the device.
Status String

The running status of this rule. Values:

RUNNING: The rule is running.

STOP: The rule is disabled.

Topic String The full name of the topic to which this rule is applied. The topic name is in the format of ${productKey}/${deviceName}/ topicShortName.
UtcModified String The last time when this rule was updated.
UtcCreated String The CST time when the rule was created.
Where String The value of WHERE that is specified in the SQL statement of this rule.


Request example
&Public Request Parameters

Response example

  • JSON format
      "Data": {
        "RuleInfo": [
            "DataType": "JSON", 
            "ShortTopic": "+/#", 
            "ProductKey": "a1KiV******", 
            "CreateUserId": "1231579085******", 
            "UtcModified": "2019-02-28T06:20:58.000Z", 
            "UtcCreated": "2019-02-28T06:14:33.000Z", 
            "Name": "iotrules", 
            "Status": "STOP", 
            "Select": "deviceName() as deviceName", 
            "Created": "Thu Feb 28 14:14:33 CST 2019", 
            "Modified": "Thu Feb 28 14:20:58 CST 2019", 
            "Topic": "/a1KiV******/+/#", 
            "Id": 152323
            "Name": "test123", 
            "Status": "STOP", 
            "Created": "Wed Feb 27 20:45:43 CST 2019", 
            "DataType": "JSON", 
            "Modified": "Wed Feb 27 20:45:43 CST 2019", 
            "UtcModified": "2019-02-27T12:45:43.000Z", 
            "CreateUserId": "1231579085******", 
            "Id": 151454, 
            "UtcCreated": "2019-02-27T12:45:43.000Z"
      "PageSize": 2, 
      "Page": 1, 
      "RequestId": "1564B626-DE97-452D-9E9B-305888AC6105", 
      "Success": true, 
      "Total": 25
  • XML format
    <?xml version="1.0" encoding="UTF-8" ?>
                <Select>deviceName() as deviceName</Select>
                <Created>Thu Feb 28 14:14:33 CST 2019</Created>
                <Modified>Thu Feb 28 14:20:58 CST 2019</Modified>
                <Created>Wed Feb 27 20:45:43 CST 2019</Created>
                <Modified>Wed Feb 27 20:45:43 CST 2019</Modified>