Create Alert Type¶
Create a new alert type.
Request Format¶
POST https://{apigw-address}/event-service/v2.1/alert-types?action=create
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  | 
|---|---|---|---|
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.  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
String  | 
The alert type ID.  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/event-service/v2.1/alert-types?action=create&orgId=yourOrgId
method: POST
requestBody:
{
    "type": {
        "typeId": "planetTemperature",
    "parentTypeId" : "parent",
        "typeDesc": {
            "defaultValue": "OverLimit",
            "i18nValue": {
                "en_US": "OverLimit",
                "zh_CN": "超限"
            }
        },
        "tags": {
            "year": "2000",
            "author": "cshan"
        }
    }
}
Return Sample¶
{
  "code": 0,
  "msg": "OK",
  "requestId": "yourReportID",
  "data": "planetTemperature"
}