Update Alert Type¶
Update an alert type. The field required to be verified include typeId.
Request Format¶
POST https://{apigw-address}/event-service/v2.1/alert-types?action=update
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.   | 
Request Parameters (Body)¶
Name  | 
Required or Not  | 
Data Type  | 
Description  | 
|---|---|---|---|
type  | 
true  | 
generateType struct  | 
Alert type. See generateType Struct.  | 
generateType Struct  ¶
Name  | 
Required or Not  | 
Data Type  | 
Description  | 
|---|---|---|---|
typeId  | 
true  | 
String  | 
Alert type ID  | 
typeDesc  | 
true  | 
StringI18n  | 
Internationalized description of alert type, for which the default fields are mandatory. For the struct, see Internationalized name struct>>  | 
tags  | 
false  | 
tags data type  | 
Tags. For details, see How to use tag>>  | 
parentTypeId  | 
false  | 
String  | 
Alert type ID of the parent alert  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
null  | 
null  | 
Sample¶
Request Sample¶
POST https://{apigw-address}/event-service/v2.1/alert-types?action=update&orgId=1c499110e8800000&isPatchUpdate=false
{
    "generateType": {
        "typeId": "planetTemperature",
            "typeDesc": {
            "defaultValue": "OverLimit",
            "i18nValue": {
                "en_US": "OverLimit",
                "zh_CN": "超限"
            }
        },
        "tags": {
            "year": "2000",
            "author": "cshan"
        }
    }
}
Return Sample¶
{
    "code": 0,
    "msg": "OK",
    "requestId": "4873095e-621d-4cfd-bc2c-edb520f574ea",
    "data": ""
}