Search Alert Content¶
Search for alert content based on the search criteria.
Note
EnOS Edge does not support OU verification for this API.
Request Format¶
POST https://{apigw-address}/event-service/v2.1/alert-contents?action=search
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the asset belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
modelId |
Optional |
String |
资The model ID. How to get modelID>> |
alertTypeId |
Optional |
String |
The alert type ID. |
subAlertTypeId |
Optional |
String |
The alert sub-type ID. |
expression |
Optional |
String |
The query expression, which supports sql-like query. The supported logical operators are “and” and “or”, and query fields are as per the below.
For more information about field description, see AlertContent Struct and Request Parameters (Body). |
pagination |
Optional |
Pagination Request Struct |
Lists the paging requirements in a request. When not specified, 10 records are displayed per page by default and sorted in descending order by |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Array of AlertContent Structs |
A list of the alert content. For details of an alertContent struct, see AlertContent Struct. |
AlertContent Struct ¶
Name |
Data Type |
Description |
---|---|---|
contentId |
String |
The alert content ID. |
contentDesc |
StringI18n |
The alert content description. |
modelId |
String |
The model ID. |
orgId |
String |
The organization ID which the asset belongs to. |
alertType |
AlertType Struct |
The details of the alert type. For more information, see AlertType Struct>> |
subAlertType |
AlertType Struct |
The details of the alert sub-type. For more information, see AlertType Struct>> |
tags |
Map |
User-defined tags. (The Key and Value are of String type.) |
updatePerson |
String |
The name of the person who last updated the alert severity. |
updateTime |
Long |
The time when the alert was last updated in UTC format. |
Samples¶
Request Sample¶
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"
}
Return Sample¶
{
"pagination": {
"pageNo": 1,
"pageSize": 1,
"totalSize": 9,
"sortedBy": [{
"field": "contentId",
"order": "DESC"
}]
},
"code": 0,
"msg": "OK",
"requestId": "yourReportID",
"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": {
}
}]
}
SDK Samples¶
You can access the SDK samples for alert engine service on GitHub: