You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm trying to create some basic automation flows using the REST API, more specifically I'm trying to create actions/task on a Confuence page and assign them to the user that is currently on watch for an Opsgenie scheduler, but the identifier returned by the Opsgenie API is not an AccountId. There doesn't seem to be any way to get that AccountId, and there is no way to match the user against the user returned by the Confluence API since there is no "get user by email" method....
The Opsgenie instance is already using Atlassian login, so how is this supposed to work? The AccountId is supposed to be the unique identifier across all the Atlassian products, but it seems that Opsgenie still uses it's own identifier...
This is all in the cloud, not on-prem, and without any changes to the default setup.
Hi @Olav Aukan
In Opsgenie, each user has a username (i.e. their login email), and a User ID.
If you have the user's email address, you can make a Get User API request using the user's email address (i.e. "username") to get the user's Opsgenie User ID.
You can also List Users to return a list of all users, with their associated User ID's.
Hope this helps!
Thank you for the quick response. I am aware of these two endpoints to retrieve users, but the problem is that the responses don't contain the AccountId of the users.
The AccountId and the User ID are tho different identifications, and I can't use a users User Id from Opsgenie to retrieve the corresponding user in Confluence since Confluence only allows you to query users by AccountId.
You can see the difference in the format of the Ids. The User ID in Opsgenie is a Guid (f7713593-fafe-4346-abc9-e34b0a940f43) but the AccountId in Confluence (and other Atlassian products) is the organization id, followed by a colon and the a Guid (123456:50a1dfb1-61ef-413d-bae4-c1cc2d6e8db9). The Guid-part of the Ids are also different for each product.
So the question then is if there is a way to get the AccountId of a user based on the users ID in Opsgenie?
Hi @Olav Aukan ,
Thanks for clarifying. I think the issue is these are 2 different API's. There's the Opsgenie API, which doesn't use nor return the Atlassian ID, then there's the Atlassian User Management API.
The Opsgenie API's do not return any information about the associated Atlassian User account. It doesn't look like the Atlassian Cloud User API allows you to use emails/usernames as identifiers, so there wouldn't be a way to an associated Atlassian User ID given an Opsgenie user id/username.
I can enter a feature request for the Opsgenie User API to return the associated Atlassian User's AccountID. (Opsgenie user is linked to an associated Atlassian User account by their login email).