2

I develop an AC/SpringBoot Jira plugin which needs to store properties in the host application. Atlassian provides Hosted Data Storage which I like to use.

I ran a test via Firefox RESTClient to play around with this feature.

When issuing a GET request to this URL:

https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/<MY-PLUGIN-KEY>

while being logged in to my Jira/Cloud instance on another tab everything is fine: I get back information about my plugin, including the key.

However, when issuing a PUT request to set a variable (like described in the documentation mentioned above) using this URL:

https://kuespert-dev.atlassian.net/rest/atlassian-connect/1/addons/<MY-PLUGIN-KEY>/properties/testProperty

and this request body:

{"string":"string-value","number":5}

as well as the required header:

Content-Type: application/json

I get back this response:

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

This is a bit irritating, since the first REST call did find my plugin while the second to the sub-resource did not.

A similar question was already asked on the 'Atlassian Community' site, but no solution was found until today.

Maybe it's just a wrong error message or something similar. Does anybody here have experience with the 'Hosted Data Storage' feature and can help?

Thanks, Matthias

DaFois
  • 2,197
  • 8
  • 26
  • 43
  • What scopes do you have set in your descriptor file? – RedWolves Nov 16 '17 at 23:53
  • "scopes": [ "READ", "ACT_AS_USER" ], – Matthias Kuespert Nov 18 '17 at 10:43
  • I think you'll need to add the "WRITE" scope to be able to set entity properties to Jira. – RedWolves Nov 19 '17 at 17:17
  • The [documentation](https://developer.atlassian.com/static/connect/docs/latest/scopes/scopes.html) states: 'NONE – can access add-on defined data' - I believe that this includes the hosted data. Meanwhile I was able to successfully set and read data programmatically via Java. However when trying to access the stored data in the browser I always get this 'Add-on with key does not exist' message. Strange. – Matthias Kuespert Nov 22 '17 at 12:48

0 Answers0