How to store add-on properties on JIRA cloud using REST Api Edited

I currently working on JIRA cloud addon. I want to store my addon properties on JIRA cloud by using REST apis. I refered this tutorial https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/.

 According to this for saving the properties, I used this REST call

Request :

PUT 

/rest/atlassian-connect/1/addons/<addon_key>/properties/<property_key>

 Response :

{
"status-code": 404,
"message": "Add-on with key does not exist."
}

 Could you please give me a solution to fix this or is there any other way to store add-on properties on JIRA cloud.

 

1 answer

0 votes
Stephen Deutsch Community Champion Jul 25, 2017

It sounds like the add-on key is not correct. Check your atlassian-connect.json file again and make sure that it matches the key there exactly. Everything else seems to be correct.

I checkd the key. It is correct. And again i check this call. I got success responce.

GET


/rest/atlassian-connect/1/addons/<addon_key>

 In here i used basic auth and i authenticated as host user. Do i need to authenticated  as addon. 

@Tharanga,

Were you able to fix this issue ?

I'm having the exact same issue.

Thanks.

Any news on this?

I encountered the same problem. However, I authenticated with

AtlassianHostRestClients.authenticatedAsAddon()

from my plugin.

Thanks.

Update:

I did the call above via Firefox REST Plugin while logged in.

When doing the same thing programmatically in my plugin I see the following in my log:

PUT request for "https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/<plugin-key>/properties/testProperty" resulted in 201 (Created)

Created GET request for "https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/<plugin-key>/properties/testProperty"

GET request for "https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/<plugin-key>/properties/testProperty" resulted in 200 (OK)

But the values are all null

Sorry, didn't document the Firefox REST call:

URL:

https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/com.xqual.jira.jira-xstudio-connect-plugin/properties/testProperty?jsonValue=true

Headers:

Content-Type: application/json

And being logged in in another browser tab in Jira/Cloud.

Result:

{

  "status-code": 404,

   "message": "Add-on with key does not exist."

}

I've got the sample problem... did anyone find an answer?

For me it's now working - I had a problem parsing the returned Json. But it's only working programmatically - not when called via the Firefox Rest client in the browser.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,963 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot