Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal server error on create issue

Yann Tronel-peyroz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 8, 2021

Hy everyone,

I'm trying to create an issue using the API (v3) on a project where the permission to create a ticket are not set. Everyone can create a ticket.

When i'm doing a request post on:

https://mycompany.atlassian.net/rest/api/3/issue

with the following body

{    

"update": {}, 

  "fields": {

"project": { "id":myId"},

"issuetype": { "id": 10100 }, 

 "summary": "test creation ticket jira par api",        

"description": {    

"type": "doc",           

 "version": 1,           

 "content": [ {  "type": "paragraph",                   

 "content": [       {                           "text": "ceci est un nouveau ticket jira créer par api avec le compte de xxx.",                            "type": "text"                       

 }                   

 ]                

}           

 ]  },        

"reporter": {  "id": "reporterId"    }    }

}

i'm getting this result: {    "errorMessages": [        "Internal server error"    ],    "errors": {}}

If i add to this request a basic auth with my mail and my token id (i have jira account permission) the issue is properly created with the correct reporter, the one passed on the body and not me.

I read some issue related to this on this support channel but it was missing the permission part.

Am I missing something on my body request. Is it possible to create an issue without basic auth even if there is no pemission set on issue creation?

 

Thanks in advance for every response.

 

1 answer

1 accepted

2 votes
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 9, 2021

Hello @Yann Tronel-peyroz,

Welcome to Atlassian Community!

When creating a ticket or using any other REST API endpoint, it’s necessary to use email address + token, even if the project permission allows anyone to create a ticket.

The create issue API is basically a “Raise request on behalf of”, you need to be authenticated to create a ticket where you are the reporter or when you are adding someone else as a reporter. 

If it was possible to use this API endpoint without authentication, then it would be considered a security breach.

If you have any other questions regarding this matter, please let us know.

Kind regards,
Angélica

Yann Tronel-peyroz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2021

Thank you for your fast and precise answer @Angélica Luz . 

In cas like this i expect a 401, the error 500 is a bit misleading. 

I was afraid of that reading other posts.

 

I do not want to use my own credentials to create an issue via API.

It's not a sustainable solution in a project perspective. 

I think i need to create a specific account linked to the project in order to post or get an issue but i will have to pay a licence for that account.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events