It pushes the data to BCM for monitoring. When you use the custom monitoring function, you can push the time series data to BCM for real-time monitoring through this API.
Request Structure
Request method:POST
URL:/csm/api/v1/userId/{userId}/custom/data
For URL parameters and request body, see the following parameter list and request example.
For request body, please see the following parameter list and request example.
List of parameters:
RequestBody Parameters
Name
Type
Description
Required?
userId
String
The tenant ID
Yes
namespace
String
Scope
Yes
eventName
String
Event Name
Yes
eventNameAlias
String
Event Alias
No
eventLevel
String, optional set: CRITICAL, MAJOR, WARNING and NOTICE
Event level
Yes
comment
String
Remarks
No
eventId
String
Event unique ID
No
timestamp
String
Time
Yes
region
String
Region
Yes
Response Parameter
Name
Type
Description
requestId
String
The request identification
code
String
Return code
message
String
Return information
Request Example
POST /csm/api/v1/custom/event/data HTTP/1.1
Host:bcm.bj.baidubce.com:80
{
"userId":"user1",
"namespace": "namespace1",
"eventName": "event1",
"eventNameAlias":"eventNameAlias1",
"eventLevel":"CRITICAL",
"comment":"{\"deviceID\":\"pd2\",\"info\":\”The number of xxx errors exceeds the limit\",\"advice\":\”Contact service personnel for repair\"}",
"eventId": "345678fghjgjhdgsfd",
"region":"bj",
"timestamp": "2020-12-31T08:00:00Z"
}
Response Example
Failed response example
{
"requestId": "45113fb2-fe84-411f-809b-9383d43003cd",
"code": "ParameterValueException",
"message": "The request param eventConfigName event1 of customEventData CustomEventData(userId=user1, namespace=namespace1, eventName=event1, eventNameAlias=eventNameAlias1, eventLevel=CRITICAL, comment={\"deviceID\":\"pd2\",\"info\":\"The number of xxx errors exceeds the limit\",\"advice\":\”Contact service personnel for repair\"}, timestamp=2020-12-31T08:00:00Z, eventId=345678fghjgjhdgsfd, region=hb) isvalid."
}