List all alert policies
GET /api/alert/policies
GET /api/alert/policiesInteractive request editor loads with JavaScript.
In: header
Query Parameters
Index to order alert policies by.
"updated_at"Value in
- "created_at"
- "updated_at"
- "name"
- "severity"
Order to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valuePage number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueCondition to search resources by.
Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.
1 <= lengthAlert enablement status.
Alert severity.
Response Body
application/json
curl -X GET "$API_BASE_URL/api/alert/policies?search=version%253Dv2"Successfully retrieved the paginated list of alert policies.
{
"total": 1,
"list": [
{
"name": "500 status alert",
"desc": "Object description.",
"labels": {
"version": "v2",
"env": "prod"
},
"enable": true,
"check_interval": 1,
"severity": "high",
"trigger_logical_operator": "All",
"id": "509fd356-df70-480b-8622-c38e27cfdd99",
"created_at": 1742288232,
"updated_at": 1742288235
}
]
}Complete operation details and schema variants
GET /api/alert/policies
List all alert policies
List alert policies configured for monitoring conditions such as error rates, latency thresholds, and availability checks. Use query filters to narrow results by severity, status, labels, and search terms.
Required IAM Permission: Action gateway:GetAlertPolicy, Resource arn:api7:gateway:alert/%s
Parameters
order_by(query, string, optional): Index to order alert policies by.direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.search(query, string, optional): Condition to search resources by.labels(query, string, optional): Label(s) to filter resources by. The format islabels[key]=valueand should be URL-encoded.status(query, array, optional): Alert enablement status.severity(query, array, optional): Alert severity.
Responses
200: Successfully retrieved the paginated list of alert policies.- allOf variant 1
list(array, optional): An array of resources.total(integer, optional): Total number of objects.- allOf variant 2
list(array, optional): The definition of an alert policy.list[].name(string, optional): The alert policy name.list[].desc(string, optional): The alert policy description.list[].labels(object, optional): Key-value pairs of labels.list[].enable(boolean, optional): If true, enable the alert policy.list[].check_interval(integer, optional): The check interval for the alert policy. The unit is second.list[].severity(string, optional): The alert severity level.list[].trigger_logical_operator(string, optional): The logical relationship between multiple triggers.list[].id(string, optional): The alert policy ID.list[].created_at(integer, optional): The create timestamp of an alert policy.list[].updated_at(integer, optional): The update timestamp of an alert policy.
cURL
curl -X GET '$API_BASE_URL/api/alert/policies'