查询通知规则¶
查询当前用户通知规则的开关、优先级、阈值和投递渠道。
GET https://billing.moi.matrixorigin.cn/api/v1/taas/notification-rules
调用前准备¶
准备个人访问令牌。
请求参数¶
将示例中的 $MOI_PERSONAL_ACCESS_TOKEN 替换为实际值。
curl --get "https://billing.moi.matrixorigin.cn/api/v1/taas/notification-rules" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
此接口没有请求参数。
成功响应¶
{
"items": [
{
"rule_key": "usage_warning",
"category": "usage",
"title": "Usage warning",
"description": "Usage threshold warning.",
"enabled": true,
"priority": "important",
"threshold_value": "90",
"threshold_unit": "percent",
"threshold_readonly": true,
"delivery_channels": [
"in_app"
],
"config_version": 1,
"updated_at": 1788710400
}
]
}
字段 |
类型 |
说明 |
|---|---|---|
|
array of object |
通知规则列表。 |
|
string |
规则标识。 |
|
string |
规则分类。 |
|
string |
规则标题。 |
|
string |
规则说明。 |
|
boolean |
规则是否启用。 |
|
string |
通知优先级。 |
|
string |
阈值,十进制字符串。不适用时省略。 |
|
string |
阈值单位。不适用时省略。 |
|
boolean |
阈值是否只读。 |
|
object |
规则作用范围。键和值由具体规则定义,未设置时省略。 |
|
array of string |
当前可投递的渠道标识。 |
|
string |
规则提示。有值时返回。 |
|
integer |
规则配置版本。 |
|
integer |
更新时间,Unix 秒。 |
最后更新于