Integration Management
This API is used by users to access the alarm data.
Function
Tenants can integrate their self-developed monitoring systems into the COC based on standards. After the integration, alarms are reported to the COC alarm center in the standard format.
URI
POST /v1/event/huawei/custom/{integration_key}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
integration_key |
Yes |
String |
Integration ID. Minimum length: 1 character Maximum length: 255 characters |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
alarmId |
Yes |
String |
Alarm id Minimum length: 1 character Maximum length: 255 characters |
alarmName |
Yes |
String |
Alarm name Minimum length: 1 character Maximum length: 255 characters |
alarmLevel |
Yes |
String |
Alarm severity. The value can be Critical, Major, Minor, or Info. Minimum length: 1 character Maximum length: 255 characters The value can be:
|
time |
Yes |
Long |
Time when an alarm is generated |
nameSpace |
Yes |
String |
Namespace of a service Minimum length: 1 character Maximum length: 255 characters |
regionId |
No |
String |
ID of the region where the alarm is generated Minimum length: 0 character Maximum length: 255 characters |
applicationId |
Yes |
String |
Application ID Minimum length: 1 character Maximum length: 255 characters |
resourceName |
No |
String |
Resource name Minimum length: 0 character Maximum length: 255 characters |
resourceId |
No |
String |
Resource ID Minimum length: 0 character Maximum length: 255 characters |
alarmDesc |
Yes |
String |
Alarm description Minimum length: 1 character Maximum length: 255 characters |
URL |
No |
String |
Original alarm URL Minimum length: 0 character Maximum length: 255 characters |
alarmStatus |
No |
String |
Alarm status. The value can be alarm (in alarm) or ok (alarm restored). Minimum length: 0 character Maximum length: 255 characters The value can be:
|
alarmSource |
Yes |
String |
Alarm Sources Minimum length: 1 character Maximum length: 255 characters |
additional |
No |
Object |
Supplementary information about the alarm |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
provider_code |
String |
Service ID. Default value: 049 Minimum length: 0 character Maximum length: 256 characters |
error_code |
String |
Request response code. The value ranges from 0000 to 9999. The value is 0 in normal cases. Default: 0 Minimum length: 0 character Maximum length: 256 characters |
error_msg |
String |
Request response description. Minimum length: 0 character Maximum length: 256 characters |
Request Example
https://coc.myhuaweicloud.com/v1/event/huawei/custom/{integration_key} { "alarmId" : "18cfxxxxxxxxxx0f8", "alarmName": "CPU Usage Exceeding Threshold", "alarmLevel" : "Critical", "time" : 1709118444540, "nameSpace" : "shanghai", "regionId" : "cn-north-4", "applicationId" : "18cfa0a5ef8d", "resourceName" : "machine-1", "resourceId" : "18cxxxxxxxxxxxxff68625", "alarmDesc" : "string", "URL" : "https://example.com", "alarmStatus" : "alarm", "alarmSource" : "coc", "additional" : { } }
Response Example
Status code: 200
The request is successful.
{ "error_code" : "COC.00000000", "error_msg" : "success", "data" : null, "provider_code" : "049" }
Status code: 400
Incorrect request body.
{ "error_code" : "COC.00000001", "error_msg" : "alarmName must not be null | alarmId must not be null", "data" : null, "provider_code" : "049" }
Status code: 401
Authentication error.
{ "error_code" : "common.01010001", "error_msg" : "Token missing or invalid.", "data" : null, "provider_code" : "049" }
Status Code
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Incorrect request body. |
401 |
Authentication error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot