Search Alert Content¶
分页查询告警内容。
备注
EnOS Edge 对该接口不支持 OU 校验。
请求格式¶
POST https://{apigw-address}/event-service/v2.1/alert-contents?action=search
请求参数(URI)¶
| 名称 | 位置(Path/Query) | 必需/可选 | 数据类型 | 描述 | 
|---|---|---|---|---|
| orgId | Query | 必需 | String | 资产所属的组织 ID。 如何获取 orgId 信息>> | 
请求参数(Body)¶
| 名称 | 必需/可选 | 数据类型 | 描述 | 
|---|---|---|---|
| modelId | 可选 | String | 资产所属模型 ID。 如何获取 modelId 信息>> | 
| alertTypeId | 可选 | String | 告警类型 ID。 | 
| subAlertTypeId | 可选 | String | 告警子类型 ID。 | 
| expression | 可选 | String | 查询表达式,支持类 SQL 的查询。目前支持的逻辑运算是 and 和 or,查询的字段和对应的运算符清单如下。 
 | 
| pagination | 可选 | Pagination 请求结构体 | 分页的参数。如未指定,默认每页 10 条。每页最大记录数为 1000 条,但为获得最佳性能,建议每页不超过 50 条。默认按照  | 
响应参数¶
| 名称 | 数据类型 | 描述 | 
|---|---|---|
| data | AlertContent 结构体数组 | 有关 AlertContent 结构体的定义。AlertContent 结构体>> | 
AlertContent 结构体 
| 名称 | 数据类型 | 描述 | 
|---|---|---|
| contentId | String | 内容ID。 | 
| contentDesc | StringI18n | 告警内容描述。国际化名称结构体>> | 
| modelId | String | 模型 ID。 | 
| orgId | String | 资产所属的组织 ID。 | 
| alertType | AlertType 结构体 | 告警类型。`AlertType 结构体>> <search_alert_type.html#alerttype-at-struct`_ | 
| subAlertType | AlertType 结构体 | 子告警类型。AlertType 结构体>> | 
| tags | Map | 用户自定义告警内容标签。标签的作用与表示方法>> | 
| updatePerson | String | 更新人员名称。 | 
| updateTime | Long | 最后一次更新时间。 | 
示例¶
请求示例¶
url: https://{apigw-address}/event-service/v2.1/alert-contents?action=search&orgId=yourOrgId
method: POST
requestBody:
{
    "pagination": {
        "pageNo": 1,
        "pageSize": 1,
        "sorters": [{
            "field": "contentId",
            "order": "DESC"
        }]
    },
  "action": "search"
}
返回示例¶
{
    "pagination": {
        "pageNo": 1,
        "pageSize": 1,
        "totalSize": 9,
        "sortedBy": [{
            "field": "contentId",
            "order": "DESC"
        }]
    },
    "code": 0,
    "msg": "OK",
    "requestId": "c4e28bda-8d76-4145-bc42-11bfc2c09c0d",
    "data": [{
        "contentId": "dateContentid",
        "contentDesc": {
      "defaultValue": null,
            "i18nValue": {
                "en_US": "dateContentid desc",
                "zh_CN": ""
            }
        },
        "modelId": "ssss",
        "orgId": "yourOrgId",
        "updatePerson": "test_user",
        "updateTime": 1546612131000,
        "alertType": {
            "typeId": "dateType",
      "orgId": "o15724268424841",
      "parentTypeId": null,
      "updatePerson": null,
      "source":null,
            "typeDesc": {
                "i18nValue": {
          "defaultValue": null,
                    "en_US": "dateType desc",
                    "zh_CN": ""
                }
            },
            "tags": {
            },
            "updateTime": 0
        },
        "subAlertType": {
            "typeDesc": {
                "i18nValue": {
          "defaultValue": null,
                    "en_US": "dateType desc",
                    "zh_CN": ""
                }
            },
      "orgId": "o15724268424841",
      "parentTypeId": null,
      "updatePerson": null,
      "source":null,
            "tags": {
            },
            "updateTime": 0
        },
        "tags": {
        }
    }]
}