Retrieving Bucket Notification Rules
Updated at:2025-11-03
API description
This API retrieves notification rules for a specified bucket.
Request URI
GET /v1/{bucketName}/?notification
| 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
Response body parameters
Description of the data structure of response body fields
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| notifications | List |
Description of the data structure of the Notifications field
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| id | String | Rule ID | notify-id-1 |
| name | String | Rule name | rule-name |
| appId | String | Product ID for registering this rule | app-id-1 |
| status | String | Options: {"disabled", "enabled"} | enabled |
| resources | List |
Subscribed resources | |
| events | List |
Subscribed events | |
| apps | List |
The product subscribed to for messages |
Description of the data structure of the Apps field
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| id | String | app-id-3 | |
| eventUrl | String | app:ImageOcr | |
| xVars | String | {"saveUrl": "http://xxx.com/ocr\"} |
Request example
JSON
1GET /v1/bucketName_example/?notification
2 <Common request headers>
3{ }
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{
4 "notifications" : [ {
5 "appId" : "app-id-1",
6 "name" : "rule-name",
7 "resources" : [ "bucket-a/path1", "bucket-a/path1" ],
8 "id" : "notify-id-1",
9 "events" : [ "PutObject", "PutObject" ],
10 "status" : "enabled",
11 "apps" : [ {
12 "eventUrl" : "app:ImageOcr",
13 "xVars" : "{\"saveUrl\": \"http://xxx.com/ocr\"}",
14 "id" : "app-id-3"
15 }, {
16 "eventUrl" : "app:ImageOcr",
17 "xVars" : "{\"saveUrl\": \"http://xxx.com/ocr\"}",
18 "id" : "app-id-3"
19 } ]
20 }, {
21 "appId" : "app-id-1",
22 "name" : "rule-name",
23 "resources" : [ "bucket-a/path1", "bucket-a/path1" ],
24 "id" : "notify-id-1",
25 "events" : [ "PutObject", "PutObject" ],
26 "status" : "enabled",
27 "apps" : [ {
28 "eventUrl" : "app:ImageOcr",
29 "xVars" : "{\"saveUrl\": \"http://xxx.com/ocr\"}",
30 "id" : "app-id-3"
31 }, {
32 "eventUrl" : "app:ImageOcr",
33 "xVars" : "{\"saveUrl\": \"http://xxx.com/ocr\"}",
34 "id" : "app-id-3"
35 } ]
36 } ]
37}
Error code
Please refer to the general error codes
