-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sending alert object as create alert response body #3124
sending alert object as create alert response body #3124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
@mastercactapus I have made the requested changes. |
@mastercactapus I have made the required changes. I have changed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Thank you! |
make check
to 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.