sending alert object as create alert response body - #3124
Merged
Merged
Conversation
mastercactapus
requested changes
Jul 12, 2023
mastercactapus
left a comment
Member
There was a problem hiding this comment.
For the response value, let's start as small as possible, and re-use existing field names from what already exists so we're consistent.
The closest we have for this is probably the webhook sender, so maybe something like this:
type CreateAlertResponse struct {
AlertID int64
ServiceID string
IsDuplicate bool
}reference: https://github.com/target/goalert/blob/master/notification/webhook/sender.go#L19
Co-authored-by: Nathaniel Caza <mastercactapus@gmail.com>
Contributor
Author
|
@mastercactapus I have made the requested changes. |
mastercactapus
requested changes
Jul 17, 2023
Contributor
Author
|
@mastercactapus I have made the required changes. I have changed the |
mastercactapus
approved these changes
Jul 19, 2023
andrewbenington
approved these changes
Jul 19, 2023
Contributor
Author
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make checkto catch common errors. Fixed any that came up.Description:
This PR adds the sends the created alert as response body in create alert generic API.
Which issue(s) this PR fixes:
Fixes #3123
Screenshots:

Describe any introduced API changes:
This PR changes the response of the createAlert API (
POST /api/v2/generic/incoming) from 204 to 200 with the alert object as the payload.