Queries a list of rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
airec:ListRules |
get |
*Instance
|
None | None |
Request syntax
GET /v2/openapi/instances/{instanceId}/rules HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
airec-cn-o400whm78004 |
| sceneId |
string |
Yes |
The ID of the scenario to which the rule belongs. Enter global to modify a global rule. |
scenetest |
| ruleType |
string |
Yes |
selection: Product selection rule. operation: Operational rule. |
selection |
| status |
string |
No |
DRAFT: Draft EFFECTIVE: Effective PUBLISHING: Publishing INEFFECTIVE: Invalid FAILED: Failed |
EFFECTIVE |
| page |
integer |
No |
The page number. The default value is 1. |
1 |
| size |
integer |
No |
The number of entries per page. The default value is 10. The value must be in the range of 1 to 50. |
10 |
| startTime |
integer |
No |
The start time. This is a UNIX timestamp in seconds. |
1567584765 |
| endTime |
integer |
No |
The end time. This is a UNIX timestamp in seconds. |
1567584765 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the result. |
||
| result |
array<object> |
The details of the result. |
|
|
object |
The details of the result. |
||
| ruleId |
string |
The rule ID. |
98493A14-D619-4E88-9F8D-108939817F9F |
| gmtModified |
string |
The time when the rule was last modified. |
2020-04-27T06:38:28.000Z |
| status |
string |
DRAFT: Draft EFFECTIVE: Effective PUBLISHING: Publishing INEFFECTIVE: Invalid FAILED: Failed |
draft |
| gmtCreate |
string |
The time when the rule was created. |
2020-04-27T06:38:28.000Z |
| code |
string |
The error code. |
InternalServerError |
| requestId |
string |
The request ID. |
8F81A922-6C81-46D6-B78C-CC35E16B1691 |
| message |
string |
The error details. |
An internal server error occurred |
Examples
Success response
JSON format
{
"result": [
{
"ruleId": "98493A14-D619-4E88-9F8D-108939817F9F",
"gmtModified": "2020-04-27T06:38:28.000Z",
"status": "draft",
"gmtCreate": "2020-04-27T06:38:28.000Z"
}
],
"code": "InternalServerError",
"requestId": "8F81A922-6C81-46D6-B78C-CC35E16B1691",
"message": "An internal server error occurred"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.