Update Alert Content
Update an alert content. The fields required to be verified include modelId
and alertTypeId
.
Request Parameters (URI)
Name |
Location (Path/Query) |
Required or Not |
Data Type |
Description |
orgId |
Query |
true |
String |
Organization ID which the asset belongs to. How to get orgId>> |
isPatchUpdate |
Query |
true |
Boolean |
Whether to perform partial update. When it is true, only the fields specified in the parameter are updated; when it is false, all the fields will be updated, i.e. the fields without specified value will be left blank. Set as true by default. |
Request Parameters (Body)
Name |
Required or Not |
Data Type |
Description |
alertContent |
true |
generateContent struct |
Alert content. See generateContent Struct. |
generateContent Struct
Name |
Required or Not |
Data Type |
Description |
contentId |
true |
String |
Alert content ID |
contentDesc |
true |
String |
Alert content description |
modelId |
true |
String |
ID of the model applicable for the alert content. How to get modelID>> |
typeId |
true |
String |
Associated alert type ID |
tags |
false |
tags data type |
Tags, only support full update. For details, see How to use tag>> |
Response Parameters
Name |
Data Type |
Description |
data |
null |
null |
Sample
Request Sample
POST https://{apigw-address}/event-service/v2.1/alert-rules?action=update&orgId=1c499110e8800000&isPatchUpdate=false
{
"alertContent": {
"contentId": "planetTemperature",
"contentDesc": {
"defaultValue": "Grid is connected from converter",
"i18nValue": {
"en_US": "Grid is connected from converter",
"zh_CN": "风机已并网"
}
},
"modelId": "WindDev-E0",
"alertTypeId": "9001",
"tags": {
"year": "2000",
"author": "cshan"
}
}
}
Return Sample
{
"code": 0,
"msg": "OK",
"requestId": "4873095e-621d-4cfd-bc2c-edb520f574ea",
"data": ""
}