Hi, How can I get bitbucket url which was setup in Application Links (JIRA)?
It's possible to retrieve the url from JIRA REST-API?
Need your helps,
Sincerely,
It is possible to get this information via the REST API in Jira, however in order to do so, you would need to use a set of the private APIs. These are not the publicly documented API for Jira that you can find in https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/ As such, these can change at anytime in Jira.
But that said, if you look at ONLY the first step of How to remove Application link using a REST endpoint, you will see the REST endpoint you can use to lookup all the applicationlinks in Jira via REST. You don't want to follow the remaining steps in that KB, as doing so would delete the application link. However it is safe to make this single REST GET call in order to see this information. We can see that you can make a REST GET call to /rest/applinks/1.0/listApplicationlinks :
Identify the Application Link(s) to be removed by performing a
GET
on<BASE_URL>/rest/applinks/1.0/listApplicationlinks
. This will provide something such as the below:<?xml version="1.0"?> <list> <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="linkAndAuthProviderEntity"> <application> <link href="http://captain-planet.example.com:60631/jira6312/rest/applinks/1.0/applicationlink/3e3c8fef-6f20-34c5-9e1f-624f0eacd943" rel="self"/> <id>3e3c8fef-6f20-34c5-9e1f-624f0eacd943</id> <typeId>confluence</typeId> <name>Confluence</name> <displayUrl>http://captain-planet.example.com:50587/conf5817</displayUrl> <iconUrl>http://captain-planet.example.com:60631/jira6312/s/en_US-qbihy0/6343/4/4.2.5/_/download/resources/com.atlassian.applinks.applinks-plugin:applinks-images/images/types/16confluence.png</iconUrl> <rpcUrl>http://captain-planet.example.com:50587/conf5817</rpcUrl> <isPrimary>true</isPrimary> <isSystem>false</isSystem> </application> <configuredOutboundAuthenticators>com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider</configuredOutboundAuthenticators> <configuredOutboundAuthenticators>com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider</configuredOutboundAuthenticators> <configuredInboundAuthenticators>com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider</configuredInboundAuthenticators> <configuredInboundAuthenticators>com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider</configuredInboundAuthenticators> <hasIncomingAuthenticationProviders>true</hasIncomingAuthenticationProviders> <hasOutgoingAuthenticationProviders>true</hasOutgoingAuthenticationProviders> <appLinkState>OK</appLinkState> <isSystem>false</isSystem> <entityTypeIdStrings>confluence.space</entityTypeIdStrings> </list> </list>
The problem I see from here is to determine which link listed here is your bitbucket applink (you can probably find this in the <typeId> or <name> tags), and then look to see if there is any difference between the displayUrl and the rpcUrl.
I hope this helps.
Andy
[edited to fix broken link]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.