Event Bus Push
Updated at:2025-11-03
API description
This API is designed to push specific events to the Event Bus.
Request structure
- method:POST
- Request URL: /v1/event-bus/recv
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| eventList | List<CloudEvent> | Event structure within the Event Bus | Yes | Body |
CloudEvent
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| data | Map<String, Object> | Event content. A JSON object defined by the user or service initiating the event. CloudEvents may include context provided by the event producer at the time of the event, encapsulated in the Data field. This can be empty. | No | Parameters |
| id | String | Event ID. A unique identifier for an event. The sender must ensure that the combination of source and ID is unique. This can be null; if null, the system will automatically generate it. | No | Parameters |
| source | String | Event source. The service providing the event, identifying the nature of the event that occurred. | Yes | Parameters |
| specversion | String | CloudEvents protocol version. This field can be empty. | No | Parameters |
| type | String | Event type. Describes event types associated with the event source. | Yes | Parameters |
| datacontenttype | String | Data content format. datacontenttype supports only the application/json format. This can be empty. | No | Parameters |
| subject | String | Event subject. JSON data containing resource identifiers involved in the event. This can be empty. | No | Parameters |
| time | String | Event occurrence time, e.g., 2020-11-19T21:04:41Z. The default value references the time when the system receives the event. This can be empty. | No | Parameters |
| resourceType | String | Cloud product subtype. This field can be null for user-defined events. It can be empty. | No | Parameters |
| level | EventLevel | Event level. This field can be null for user-defined events. | No | Parameters |
| accountId | String | Cloud account ID. This can be empty and is retrieved from the request headers by default. | No | Parameters |
| eventBusId | String | The event bus ID that receives the events. | No | Parameters |
| eventBusName | String | Event bus name for receiving events. | Yes | Parameters |
| eventSourceAlias | String | The Chinese alias of the event source. This can be empty. | No | Parameters |
| eventAlias | String | The Chinese alias of the event type. This can be empty. | No | Parameters |
| eventAliasEn | String | The English alias for the event type. This field can be left blank. | No | Parameters |
| region | String | The region of the event. This field can be left blank. | No | Parameters |
| recvTimestamp | String | The timestamp when the event was received: 2020-11-19T21:04:41+08:00. | No | Parameters |
Response parameters
| Name | Types | Description |
|---|---|---|
| events | List<CloudEvent> | Push event |
Request example
JSON
1{
2 "eventList": [
3 {
4 // Event details, optional, which can be used for rule matching, etc.
5 "data": "{\"info\":\"System exception occurred\",\"advice\":\"Please contact the administrator\"}",
6 // Event source name, required
7 "source": "App_DEMO",
8 // Event name, required
9 "type": "DEMO_EVENT",
10 // Event ID, optional. A string will be generated randomly by default.
11 "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
12 Event source, optional. Null by default
13 "subject": "qcs::dts:ap-guangzhou:appid12312/uid1250000000:xxx",
14 // Event occurrence time, optional. Defaulting to the time the event is received
15 "time": 1615430559146,
16 // Event occurrence region, optional.
17 "region": "bj"
18 },
19 ...
20 ],
21 "eventBusId": "eb-xxxxxx"
22}
Response example
JSON
1{
2 "events": [
3 {
4 // Event details
5 "data": {
6 "info": "System exception occurred",
7 "advice": "Please contact administrator"
8 },
9 // Event ID
10 "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
11 // Event source name
12 "source": "source1",
13 // Event name
14 "type": "DEMO_EVENT",
15 // Event source
16 "subject": "qcs::dts:ap-guangzhou:appid12312/uid1250000000:xxx",
17 // Event occurrence time
18 "time": "2023-01-01T00:00:00+0800",
19 // Event bus ID
20 "eventBusId": "bus1",
21 // Event bus name
22 "eventBusName": "busName1",
23 // Event name
24 "eventAlias": "eventAlias1",
25 // Event name, English
26 "eventAliasEn": "eventAliasEn1",
27 // Region
28 "region": "region1",
29 },
30 ...
31 ]
32}
