Update Alert Type¶
Update an alert type. If the alert type already has a parent alert type, the parentTypeId cannot be updated.
Request Format¶
POST https://{apigw-address}/event-service/v2.1/alert-types?action=update
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
orgId  | 
Query  | 
Mandatory  | 
String  | 
Organization ID which the asset belongs to. How to get orgId>>  | 
isPatchUpdate  | 
Query  | 
Mandatory  | 
Boolean  | 
Request Parameters (Body)¶
Name  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
type  | 
Mandatory  | 
GenerateType Struct  | 
The details of the alert type. For more information, see GenerateType Struct.  | 
GenerateType Struct  ¶
Name  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
typeId  | 
Mandatory  | 
String  | 
The alert type ID.  | 
typeDesc  | 
Mandatory  | 
StringI18n  | 
Specify the alert type’s description in its respective locale’s language. For more details on the structure and locales supported, see Internationalized name struct>>  | 
tags  | 
Optional  | 
Map  | 
User-defined tags. (The Key and Value are of String type.) For details, see How to use tags>>  | 
parentTypeId  | 
Optional  | 
String  | 
The alert type ID of the parent alert.  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/event-service/v2.1/alert-types?action=update&orgId=yourOrgId&isPatchUpdate=false
method: POST
requestBody:
{
  "action": "update",
    "type":{
        "typeId":"planetTemperature",
        "typeDesc":{
            "defaultValue":"OverLimit",
            "parentTypeId":"parent",
            "i18nValue":{
                "en_US":"OverLimit",
                "zh_CN":"超限"
            }
        },
        "tags":{
            "year":"2000",
            "author":"cshan"
        },
    "parentTypeId": "chenchen_test_documentation"
    }
}
Return Sample¶
{
    "code": 0,
    "msg": "OK",
    "requestId": "4873095e-621d-4cfd-bc2c-edb520f574ea",
    "data": null
}