Rotate integration API key using the API

Robert Horvath
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 8, 2023

We tried to use the integration API to rotate the key using  "update" but the key was not rotated.

We need to rotate the API key programmatically and update all the initiators' configurations in the same time.

As we see on the web UI the following  URL is used to do that

"webapi/v3/integrations/unified/<integration id>/regenerate-token?type=azure&teamId=<ownertiemid>"

Unfortunately, we couldn't find any reference on how we could use the above URL from an application.

Could you please help how to use the rest API or the webapi to achieve or goal?

1 answer

0 votes
Zeeshan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2023

Hey Robert,

It is not possible to refresh an integration's API Key via the REST API. We do have a Feature suggestion ticket for it that you may track and vote on via: https://jira.atlassian.com/browse/OPSGENIE-1817

The workaround to do so via the REST API would be to run the GET Integration API, use the data to create a New integration with all the same configuration and Delete the old integration.

Best regards,

Brian Mitchell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 30, 2024

Can you provide a link to the "GET Integration API" documentation?  

Zeeshan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2024
Brian Mitchell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2024

Thanks @Zeeshan  I guess I stumbled on the wrong topic and missed that the previous posts were Opsgenie specific but what we need to be able to do is rotate, or create new, revoke old API keys for the Attlassian admin for our account  https://admin.atlassian.com/  Settings->API keys which we use to access audit logs for FedRamp compliance.  We need to rotate that key every 90 days and would like to be able to do so in an automated fashion.  If you have any pointers they would be greatly appreciated.

 

Thanks!

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2024

It's also not possible to rotate the Atlassian API key by API.

Zeeshan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2024

@Brian Mitchell ,

Yes as you mentioned this is an Opsgenie specific thread, hence, your query regarding Atlassian APIs is out of my scope of support. However, you can forward it to my colleagues in this community: https://community.atlassian.com/t5/Atlassian-Account/ct-p/account-identity and they will be happy to help you out there.

 

BR,

Brian Mitchell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2024

Thanks @Zeeshan .  I appreciate the response and the help!

Zeeshan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2024

You're most welcome! :) 

Suggest an answer

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

Atlassian Community Events