Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira cloud addon: use API to create oauth1 application link

Alexey Stogny July 18, 2019

Is there any way to create oauth1 application link by rest API, using jira cloud addon credentials?

1 answer

1 accepted

2 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2019

Hi @Alexey Stogny ,

Welcome to the Atlassian Community!

There is no official REST API endpoint available to create Application Links. Neither for Jira Server, nor for Cloud. However, as a workaround, you can use the unofficial endpoint discussed in the below thread:

 

I have just tested this and it works fine:

Endpoint: 

https://xxxxxxx.atlassian.net/rest/applinks/1.0/applicationlinkForm/createAppLink

 

Request Body: 

{
"applicationLink": {
"typeId": "generic",
"name": "myapp",
"displayUrl": "http://example.com",
"rpcUrl": "http://example.com",
"isPrimary": false,
"isSystem": true
},
"username": "admin",
"password": "admin",
"customRpcURL": false,
"rpcUrl": "",
"createTwoWayLink": false,
"configFormValues": {
"trustEachOther": false,
"shareUserbase": false
}
}

 

Response Body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<createdApplicationLink>
<applicationLink>
<link href="https://xxxxxxx.atlassian.net/rest/applinks/latest/applicationlink/a9b9f043-36ce-3181-a08e-774e01113b31" rel="self"/>
<id>a9b9f043-36ce-3181-a08e-774e01113b31</id>
<typeId>generic</typeId>
<name>myapp</name>
<displayUrl>http://example.com</displayUrl>
<iconUrl>https://xxxxxxx.atlassian.net/s/-w84psc/b/11/14089203f537b6cb29f73c5809f577b4a6a0c922/_/download/resources/com.atlassian.applinks.applinks-plugin:applinks-images/images/types/16generic.png</iconUrl>
<iconUri>https://xxxxxxx.atlassian.net/s/-w84psc/b/11/14089203f537b6cb29f73c5809f577b4a6a0c922/_/download/resources/com.atlassian.applinks.applinks-plugin:applinks-images/images/config/logos/128x128/128generic.png</iconUri>
<rpcUrl>http://example.com</rpcUrl>
<isPrimary>false</isPrimary>
<isSystem>false</isSystem>
</applicationLink>
<autoConfigurationSuccessful>true</autoConfigurationSuccessful>
</createdApplicationLink>

 

Please notice that this is just a workaround: the endpoint is not officially documented and it may change without prior notice.

 

For the rest:

  1. We have the folloring feature request open in our system asking for this functionality in Cloud (the one for Server is linked), but as you can see it only got a handful of votes in couple of years. Please vote and watch it, so that you will be notified by email in case of any update: [JRACLOUD-61753] REST API to Create Application Link
  2. You may find interesting the following KB explaining how to GET and DELETE Application Links via REST API: How to remove Application Link (AppLinks) via REST API
  3. Ways to create Application Links programmatically are explained in the following thread:  Can I use Application Links via REST API to connect applications?

 

Please let me know if this helps or if you have further questions on this topic.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer