Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I send an alert to another team using my API key?

Tracy Green July 16, 2024

We manage several integrations that involve other teams at our organization.  Many times, a problem will occur that needs to be referred to another team.  We've been doing this with email, but now we would like to send them an opsgenie alert.  

We have been creating alerts for our own team using the REST API.  We have an integration key set up.  Since the Rest API for creating an alert allows us to specify responders, can we use our integration key to send to another responder? 

We recently set this up, and the alerts have been coming to our team rather than the other responder.  We're wondering if the issue is that the responder we're using is incorrect and it's defaulting to us as team registered with the integration key or are we just not allowed to send to other responders.  We assumed we could code any responder -- otherwise, why would we have to code it at all?  Any thoughts would be appreciated.

1 answer

0 votes
Wei Wung
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2024

Hi @Tracy Green 

Thank you for reaching out!

The apiKey that you are describing sounds like it is from a team-based REST API integration, and if it is team-based, it can only create an alert for the team that owns it, your team in this case.

To confirm if the REST API integration is team-based, click into the integration, and at the top, under Integration settings, the "Assignee team" field will either show the owning Team or "None (Global integration)".  If it is a global integration, then you will be able to use it's apiKey to create alerts for another team as long as the team name or its Id# is coded correctly (case sensitive).  The Create Alert section of the Alert API doc has an example.

Workaround.

A simple workaround would to manually open the alert > click on the ellipsis "..." menu on the top right of the alert > select "Add Responder" to add the team you want to refer the issue to.

Another workaround would be to use a specific tag when creating the alert, then in your team's routing rule, filter for that tag to route the alert to a separate escalation policy containing the "route to team" escalation rule.  Once the alert is created with this special tag, it will be routed to the escalation team specified in that escalation policy.

For example:
RouteToTeamDBA.png

Your team will still be the Owner team of the alert but the on-call of the DBA team will be notified by this alert.

To route to another team, you would use a different combination of tag, routing rule, and escalation policy.

Hope the above helps.

Best Regards,

 

Wei

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events