Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Rest API, status 415

TestApi987 December 10, 2015

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?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2016

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.

TAGS
AUG Leaders

Atlassian Community Events