Hello. I'm developing a widget with "Atlassian Connect". I need to create issue through Rest API, but when I'm sending a request to Rest API, I'm getting an error "http status 415". I Have several questions:
1. I'm using JWT authorization. What should I write in "iss" - "add-on key specified in the add-on descriptor" or "clientKey"?
2. What type of parameters should I use with POST request - JSON or query string?
3. Why am I getting "http status 415" error?
Community moderators have prevented the ability to post new answers.
1. I'm using JWT authorization. What should I write in "iss" - "add-on key specified in the add-on descriptor" or "clientKey"?
You should be using the top level key from your Atlassian Descriptor as the iss of your JWT token. For example, for this descriptor the iss should be: "com.atlassian.myreminders". This is when you are making a request from your add-on back to JIRA.
2. What type of parameters should I use with POST request - JSON or query string?
That is impossible to know without knowing which rest resource you are trying to access. Which rest resource are you trying to access? I would strongly recommend that you try and use the REST Api Browser when doing this development to see the structure of the HTTP requests that you need to make.
3. Why am I getting "http status 415" error?
The status 415 means that your 'Content-Type' header is not set correctly on the outgoing request. Please make sure you set it correctly for the type of data that JIRA expects to parse.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.