Obtaining the Rule Set List
Function
Obtaining the Rule Set List
URI
GET /v2/{domain_id}/tenant/rule-sets/query
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_id |
Yes |
String |
Indicates the tenant ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
offset |
Yes |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
|
limit |
Yes |
Integer |
Number of records displayed on each page |
|
include_tenant_rule_set |
Yes |
Boolean |
Whether tenant-level rules are included |
|
name |
No |
String |
Policy name, which is used for fuzzy query. |
|
is_valid |
No |
Boolean |
Whether the alarm is valid. |
|
type |
No |
String |
Rule Set Type |
|
cloud_project_id |
No |
String |
Project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Array of RuleSet objects |
List of rule instances |
|
total |
Long |
Total number. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Rule Template Instance ID |
|
name |
String |
Rule Template Instance Name |
|
type |
String |
Type |
|
version |
String |
Version |
|
operator |
String |
Latest Operator |
|
operate_time |
Long |
Last Operation Time |
|
is_valid |
Boolean |
Effective |
|
level |
String |
Tenant-level and project-level |
|
is_public |
Boolean |
System Level |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Error Message |
|
error_code |
String |
Error code. |
Example Requests
GET https://{endpoint}/v2/ce8df55870164338a72d7e828a966a2a/tenant/rule-sets/query?name=&limit=2&offset=30&cloud_project_id=
Example Responses
Status code: 200
OK
{
"data" : [ {
"id" : "30782f30c92e4c1dbc3c596075970d67",
"name" : "Creating a Tenant-Level Policy -apitest-rKaG on DJtest",
"level" : "tenant",
"is_valid" : true,
"version" : "67e915e472554f719abe513c28728d9f",
"operator" : "devcloud_xxx",
"is_public" : false,
"operate_time" : 1692695390000
}, {
"id" : "4f5fb96022974a2781174584f799d8c2",
"name" : "Creating a Tenant-Level Policy on DJtest-apitest-S190",
"level" : "tenant",
"is_valid" : true,
"version" : "61ebfef577c34406b5647ac1d83e7bb8",
"operator" : "devcloud_xxx",
"is_public" : false,
"operate_time" : 1692695390000
} ],
"total" : 333
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.