Skip to content
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

How to get the ID of a newly created alert #134

Open
arno4000 opened this issue Jun 28, 2023 · 1 comment
Open

How to get the ID of a newly created alert #134

arno4000 opened this issue Jun 28, 2023 · 1 comment

Comments

@arno4000
Copy link

I am creating an alert with the alertClient.Create() function https://docs.opsgenie.com/docs/opsgenie-go-api-v2#create-alert.

How can I get the ID of the newly created alert? Currently, I am setting a self-generated ID as alias and then query the alert with the alias ID to get the alert ID. Is there a way to directly get the ID of the alert, or is this not possible as the alert is created async in the background?

The response object with the type alert.AsyncAlertResult only contains a request ID. Is there a way to get the alert ID with the request ID?

@foxthedream
Copy link

Same here. Can someone from the team respond. It is not in your documentation but it does imply the above is correct. Is the only way of query/closing alerts is by using the alias?

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

No branches or pull requests

2 participants