How to add Entity properties in jira cloud plugin

Hi All,

I am following the below document
https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/

but I am getting an error status-code": 404, and “message”: “App with key does not exist.”

did I have to add anything in Atlassian-connect.json file please share me working example of this.

Any update on this please.

Regards,
Sarika Dalal

The 404 is typically returned when you try to retrieve an entity that does not (yet) exist. Are you using GET http method? If you want to store an entity, you need to use PUT.

Can you share your code? That way I can see what you are trying to do and give you proper pointers.

Hi @remie,

I am calling below rest api from my command prompt to store entity but not able to execute this rest call getting error.

curl -X PUT -H “Content-type: application/json” -d ‘{“content”:“Test if works on Jira Cloud”, “completed” : 1}’ --user ‘sarika.d@mail.com:ABC@321’ https://jira-instance1.net/rest/api/2/issue/ENPR-4/properties/tasks

is anything wrong I am calling here .

The url of your instance seems a bit off, did you change that in this example? Because normally, Jira Cloud instances would have a https://<NAME>.atlassian.net base url. You might also want to switch to version 3 of the api /rest/api/3/.

Also, it seems like you are using Basic authentication (username/password). That authentication method is no longer supported, you should use API tokens. In addition, maybe you should remove the user credentials from your example, as this is a public forum :slight_smile:

API 3 is still in beta, I wouldn’t recommend switching to it, unless you need to work with ADF.

This message is returned only when accessing app properties. You need to be authenticated with JWT as your app to do it. Regular requests with curl and basic auth as yourself won’t work.

1 Like

@remie

Here JIRA URL and credentials both are invalid to show you how I am calling rest api from cmd propmpt.

1 Like

So… maybe change the documentation pages? As V3 is now the default API to which the documentation refers (https://developer.atlassian.com/cloud/jira/platform/rest/). The comment about the API being in BETA is not really visible and it is only listed after the page reads

This documentation is for version 3 of the Jira Cloud platform REST API, which is the latest version.

@remie and @kkercz

Please check attached screenshots here I have generated API token and from this screenshot I erase due to security issue.

I am following below https://blog.developer.atlassian.com/creating-a-jira-cloud-issue-in-a-single-rest-call/ documentation to call rest api from curl.exe

Why I am getting this error anything wrong I am writing.

@SarikaDalal It looks like you’ve got the last 8 characters of your password clearly visible in that screenshot.

@jkells,

Thanks for update but its a temporary API token and after posting screenshot i revoke that.