Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-10-28T12:41:17Z",
"generated_at": "2025-12-09T17:38:40Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -148,15 +148,15 @@
"hashed_secret": "7eeef8638d6f283c8d76d7811ec6e5f198e16021",
"is_secret": false,
"is_verified": false,
"line_number": 7675,
"line_number": 7927,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 10682,
"line_number": 10934,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ SDK Methods to consume
- [Verify SMTP](#verify-smtp)
- [Metrics](#Metrics)
- [Get Metrics](#get-metrics)
- [Get Bounce Metrics](#get-bounce-metrics)
- [Send Notifications](#send-notifications)

## Source
Expand Down Expand Up @@ -1208,6 +1209,8 @@ get_metrics_response = self.event_notifications_service.get_metrics(
gte=<gte-timestamp>,
lte=<lte-timestamp>,
destination_id=<destination-id>,
subscription_id=subscription_id6,
source_id=source_id,
email_to=<email-to>,
notification_id=<notification-id>,
subject=<subject>
Expand All @@ -1217,6 +1220,27 @@ metric_response = get_metrics_response.get_result()

```

### Get Bounce Metrics

```py

get_bounce_metrics_response = self.event_notifications_service.get_bounce_metrics(
instance_id=<instance-id>,
destination_type="smtp_custom",
gte=<gte-timestamp>,
lte=<lte-timestamp>,
destination_id=<destination-id>,
subscription_id=subscription_id6,
source_id=source_id,
email_to=<email-to>,
notification_id=<notification-id>,
subject=<subject>
)

bounce_metrics_response = get_bounce_metrics_response.get_result()

```

### Send Notifications

```py
Expand Down
33 changes: 33 additions & 0 deletions examples/test_event_notifications_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -2578,6 +2578,8 @@ def test_get_metrics(self):
gte,
lte,
destination_id=destination_id16,
subscription_id=subscription_id6,
source_id=source_id,
email_to=email_to,
notification_id=notificationID,
subject=subject,
Expand All @@ -2590,6 +2592,37 @@ def test_get_metrics(self):
except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_get_bounce_metrics(self):
try:
print("\nget_bounce_metrics() result:")
# begin-bounce-metrics
destination_type = "smtp_custom"
gte = "2025-12-08T17:18:43Z"
lte = "2025-12-09T17:18:43Z"
email_to = "testuser@in.ibm.com"
subject = "The Metric Test"

get_bounce_metrics_response = self.event_notifications_service.get_bounce_metrics(
instance_id,
destination_type,
gte,
lte,
destination_id=destination_id16,
subscription_id=subscription_id6,
source_id=source_id,
email_to=email_to,
notification_id=notificationID,
subject=subject,
)

bounce_metric_response = get_bounce_metrics_response.get_result()
print(json.dumps(bounce_metric_response, indent=2))
# end-bounce-metrics

except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_create_smtp_configuration_example(self):
global template_notification_id, template_invitation_id, slack_template_id
Expand Down
Loading