Update Alert Type


Update an alert type. If the alert type already has a parent alert type or is not a child, 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

The organization ID which the asset belongs to. How to get orgId>>

isPatchUpdate

Query

Mandatory

Boolean

  • true = Only the fields specified in the parameters are updated. The values of those fields not specified will be retained.

  • false = The fields specified in the parameters are updated. Those fields not specified will have their existing values (if any) deleted.

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.

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
}

SDK Samples


You can access the SDK samples for alert engine service on GitHub: