Help Center/ DataArts Lake Formation/ API Reference/ API/ Console/ Alarm Management/ This API is used to upload external alarm information.
Updated on 2025-02-14 GMT+08:00

This API is used to upload external alarm information.

Function

This API is used to collect external alarm information.

URI

POST /v1/external-alarm

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

signature

No

String

Integrity signature.

subject

No

String

Alarm subject.

topic_urn

No

String

Notification group.

message_id

No

String

Message ID.

message

No

String

Message content.

signature_version

No

String

Signature version.

type

No

String

Notification type. The values include Notification (event notification), SubscriptionConfirmation (subscription confirmation), and UnsubscribeConfirmation (unsubscription confirmation).

Enumeration values:

  • Notification

  • SubscriptionConfirmation

  • UnsubscribeConfirmation

subscribe_url

No

String

Subscription link. This field is available when the subscription is not confirmed.

unsubscribe_url

No

String

Unsubscription link. This parameter is available when the subscription is confirmed.

signing_cert_url

No

String

Certificate link.

timestamp

No

String

Generation time.

auth

No

String

Authorization information.

Response Parameters

Status code: 400

Table 2 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

common_error_code

String

CBC common error code.

solution_msg

String

Solution.

Status code: 404

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

common_error_code

String

CBC common error code.

solution_msg

String

Solution.

Status code: 500

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

common_error_code

String

CBC common error code.

solution_msg

String

Solution.

Example Requests

Request body for collecting external alarm data.

POST https://{endpoint}/v1/external-alarm

{
  "signature" : "OeJ5QozBXn4lI+S+rklNSg7jX85hLFsYMdLfkh07NMOdJXIxq8eGkI+io1lUgJlxKYAIE98m8nXII0+IrlEe5ovVjaFIYkg7f0+qKL+jyfZv5lyJwPAE+WXQuHPRPy7ZBr1fnzXJpnTeDT7Js9LNLnSF7I3RkA0i+pggZv36jhC0ZGaYr8cnlekpnw7hQgGDWf48ZA57f1OP5LbsisL4KmyW3y2mf5/UPnhBK+s1SfiLarGJkFqOKGDn4MPxO81iGUDokGQQr6MpmWL9mHGACKkymnyEQcsZQnKoFsNjtJ/oGM8D14I3r4K20n0GvWPDxZou6wpbN6dvmSmtuqI0Rw==",
  "subject" : "[Critical alarm] Cloud Eye notification: An alarm has been triggered because the dedicated API Gateway instance **dalf-d67f-f9d7dce4-60d8-4566-9d66-82503cb92d88** exceeded the limit of API calls.",
  "topic_urn" : "urn:smn:cn-north-7:a41e18612c054a4c994bb7a837a91ebe:CES_notification_group_aKan6BAzR",
  "message_id" : "cfd477a2441b45179ba0dcfbd22f2c88",
  "signature_version" : "v1",
  "type" : "Notification",
  "message" : "{\n  \"message_type\": \"alarm\",\n  \"alarm_id\": \"al1695796819449Pv80VlkvN\",\n  \"alarm_name\": \"DALF_APIC_requests_EMERGENCY\",\n  \"alarm_status\": \"alarm\",\n  \"time\": 1695797165992,\n  \"namespace\": \"SYS.APIC\",\n  \"metric_name\": \"requests\",\n  \"dimension\": \"instance_id:af042c1def5b41389ab88c676ba275a4\",\n  \"period\": 1,\n  \"filter\": \"Raw data\",\n  \"comparison_operator\": \"\\u003e=\",\n  \"value\": 50,\n  \"unit\": \"\",\n  \"count\": 1,\n  \"alarmValue\": [\n    {\n      \"time\": 1695796980000,\n      \"value\": 99\n    }\n  ],\n  \"sms_content\": \"[CN North-*xxxxxxxx*][Critical alarm] Dear *xxx*, dedicated API gateway instance **dalf-xxxx-xxxxxxx-xxxx-4eac-8b89-4bededd47e9d** (ID: af042c1def5b41389ab88c676ba275a4) made 99 API calls in one minute, which is 44 times more than the allowed limit of 50 API calls per minute. This will trigger an alarm at 14:46:05 GMT+08:00 on September 27, 2023, according to the **DALF_APIC_requests_EMERGENCY** rule. For details, visit the website of Cloud Eye Service (CES). \",\n  \"default_content\": \" [CN North-Ulanqab-203][Critical alarm] Dear *xxx*, dedicated API gateway instance **dalf-xxxx-xxxxxxxx-xxxx-4eac-8b89-4bededd47e9d** (ID: af042c1def5b41389ab88c676ba275a4) made 99 API calls in one minute, which is 44 times more than the allowed limit of 50 API calls per minute. This will trigger an alarm at 14:46:05 GMT+08:00 on September 27, 2023, according to the **DALF_APIC_requests_EMERGENCY** rule. For details, visit the website of CES. \"\n  }",
  "unsubscribe_url" : "https: //example.com/smn/subscription/unsubscribe?region=cn-north-7&region_id=cn-north-7&subscription_urn=urn:smn:cn-north-7:a41e18612c054a4c994bb7a837a91ebe:CES_notification_group_aKan6BAzR:93b74d59e4364e8e9ea0167b8bf0d2f6",
  "signing_cert_url" : "https://example.com/smn/SMN_cn-north-7_94f7b4675c6a45f282b7d8e3ea30713e.pem",
  "timestamp" : "2023-09-15T06:46:07Z"
}

Example Responses

Status code: 401

Unauthorized

{
  "error_code": 'APIG.1002',
  "error_msg": 'Incorrect token or token resolution failed'
}

Status code: 403

Forbidden

{
  "error" : {
    "code" : "403",
    "message" : "X-Auth-Token is invalid in the request",
    "error_code" : null,
    "error_msg" : null,
    "title" : "Forbidden"
  },
  "error_code" : "403",
  "error_msg" : "X-Auth-Token is invalid in the request",
  "title" : "Forbidden"
}

Status code: 404

Not Found

{
  "error_code" : "common.01000001",
  "error_msg" : "response status exception, code: 404"
}

Status code: 408

Request Timeout

{
  "error_code" : "common.00000408",
  "error_msg" : "timeout exception occurred"
}

Status code: 500

Internal Server Error

{
  "error_code" : "common.00000500",
  "error_msg" : "internal error"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

408

Request Timeout

500

Internal Server Error

Error Codes

See Error Codes.