Skip to content

fix: adding the smtp config id for metrics api#70

Open
harini-ibm wants to merge 1 commit into
mainfrom
metrics
Open

fix: adding the smtp config id for metrics api#70
harini-ibm wants to merge 1 commit into
mainfrom
metrics

Conversation

@harini-ibm

@harini-ibm harini-ibm commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

PR summary

Fixes: https://github.ibm.com/Notification-Hub/planning/issues/19982

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

For the GET /metrics API current documentation states that destination_type is a mandatory parameter for retrieving metrics. However, this is not accurate, as metrics can be retrieved without always providing destination_type.

What is the new behavior?

For the GET /metrics API, users can provide either destination_type or smtp_config_id to retrieve metrics. Supplying both parameters is not required.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

.destinationType("smtp_custom")
.gte("2025-12-08T17:18:43Z")
.lte("2025-12-09T11:55:22Z")
.smtpConfigId(smtpConfigID)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why smtpConfigId is required here? for smtp_custom type

.gte("2024-08-01T17:18:43Z")
.lte("2024-08-02T11:55:22Z")
.smtpConfigId(smtpConfigID)
.destinationId(destinationId16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destinationId is not required in case of smtpConfigId. check once

.smtpConfigId(smtpConfigID)
.gte(instant.minus(Duration.ofDays(1)).toString())
.lte(d1)
.destinationId(destinationId16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is destinationId required in case of smtpConfigId

@nitish-sudo nitish-sudo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants