Pushing Event Messages
Updated at:2025-11-03
API description
Push event messages to the configured URL.
If the encryption field is configured in the rule, the request will carry an authorization signature to ensure the message is neither forged nor tampered with.
Note:
- Status code: 200 OK can indicate the message push is successful. Otherwise, it shall be retried.
- For overload protection, it supports status code: 429 Too Many Requests return value, and will retry after an interval;
Request URI
POST /v1/{bucketName}/?event
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| events | List |
No |
Description of the data structure of the Events field
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| version | String | No | Event version, currently 1.0 | 1.0 |
| eventId | String | No | Unique identifier of event | 2a513199-bbb9-4ac7-b12a-60213c26810d |
| eventOrigin | String | No | Event-triggering source. Currently, it supports incremental (bos:realtime). | bos:realtime |
| eventTime | String | No | Event occurrence time (in GMT format) | 2018-09-05T02:28:49Z |
| eventType | String | No | Event type | PutObject |
| content | Content | No | Event details |
Description of the data structure of the Content field
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| userId | String | No | User ID | c7ac82ae14ef42d1a4ffa3b2ececa17f |
| domain | String | No | Corresponding domain | bj.bcebos.com |
| bucket | String | No | Corresponding bucket | bucket-test |
| object | String | No | Object name | images/test.jpg |
| eTag | String | No | The eTag of the object. If the object may be overwritten, the eTag is used to determine which version of the object triggers the event. | 977b9623a15e520c663ac5ff6647e881 |
| contentType | String | No | Content type of the object | application/octet-stream |
| filesize | Integer | No | File size | 24414 |
| lastModified | String | No | File update time | 2018-09-05T02:28:49Z |
| credentials | Credentials | No | Temporary authorization for related resources. Refer to Temporarily Authorized Access for specific usage. | |
| xVars | String | No | Original xVars in the notification set by the user | {"saveUrl": "http://xxx.com/ocr\"} |
Description of the data structure of the Credentials field
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| accessKeyId | String | No | Temporarily authorized access key ID | f3ade7c6b1a911e8bb6821a724cc157d |
| secretAccessKey | String | No | Temporarily authorized secret access key | 07381a56d35e4b1193a418362221de81 |
| sessionToken | String | No | Temporarily authorized session token | ZGZiM2M3MmU4Mjk4NGQ2MGEzYTNhYTAyMDE3NTZmZmV8AAAAAIcCAADaE18IR6jSaVWlMHxZG5wzb/7AQas3Y6V |
| expiration | String | No | Validity period of temporary authorization | 2018-02-22T11:22:33Z |
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1POST /v1/bucketName_example/?event
2 <Common request headers>
3{
4 "events" : [ {
5 "eventId" : "2a513199-bbb9-4ac7-b12a-60213c26810d",
6 "eventTime" : "2018-09-05T02:28:49Z",
7 "eventType" : "PutObject",
8 "version" : "1.0",
9 "content" : {
10 "bucket" : "bucket-test",
11 "credentials" : {
12 "accessKeyId" : "f3ade7c6b1a911e8bb6821a724cc157d",
13 "secretAccessKey" : "07381a56d35e4b1193a418362221de81",
14 "sessionToken" : "ZGZiM2M3MmU4Mjk4NGQ2MGEzYTNhYTAyMDE3NTZmZmV8AAAAAIcCAADaE18IR6jSaVWlMHxZG5wzb/7AQas3Y6V",
15 "expiration" : "2018-02-22T11:22:33Z"
16 },
17 "domain" : "bj.bcebos.com",
18 "xVars" : "{\"saveUrl\": \"http://xxx.com/ocr\"}",
19 "eTag" : "977b9623a15e520c663ac5ff6647e881",
20 "filesize" : 24414,
21 "lastModified" : "2018-09-05T02:28:49Z",
22 "userId" : "c7ac82ae14ef42d1a4ffa3b2ececa17f",
23 "contentType" : "application/octet-stream",
24 "object" : "images/test.jpg"
25 },
26 "eventOrigin" : "bos:realtime"
27 } ]
28}
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
