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) Required or Not Data Type Description
orgId Query true String Organization ID which the asset belongs to. How to get orgId>>

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 structure, see Internationalized name struct>>.
tags false tags data type Tags alert type
parentTypeId false String Alert type ID of the parent alert

Response Parameters

Name Data Type Description
data String typeId

Sample

Request Sample

POST https://{apigw-address}/event-service/v2.1/alert-types?action=create&orgId=yourOrgId
{
    "type": {
        "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"
}