Forums

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

Error on create isue

Kmeleon October 15, 2020

When I try to record a issue via API I receive:

{"errorMessages":["Nós não podemos criar este item para você agora, poderia ser devido ao conteúdo sem suporte que você informou em um ou mais dos campos do item. Se esta situação persistir, contate o administrador, ele será capaz de acessar informações mais específicas no arquivo de log."],"errors":{}}


{
"fields":{
"project":{
"key":"GSD"
},
"summary":"sadfasf asfa sfd asfd asf",
"issuetype":{
"id":"10003"
},
"priority":{
"name":"High"
},
"labels":[
"bugfix",
"e-commerce"
],
"description":{
"type":"doc",
"version":"1",
"content":[
{
"type":"paragraph",
"content":[
{
"text":"blablalblalbala 6\r\n\r\nqm1c78e294da40:9e67eeb4-bf67-4f63-84ec-28a73e451036ssfsafasfsa fsdgsdfg sdfgsdg",
"type":"text"
}
]
}
]
}
}
}

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2020

Hi,

I see that you are trying to call a Jira Cloud REST API endpoint in order to create an issue, but you seem to keep getting this error.  When I copied your code and changed the project key and issue id type, I too got the same error, but in English of:

{"errorMessages":["We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file."],"errors":{}}

I tried removing a number of elements until I finally removed the entire description section and then I was able to create the issue.  I think that there might be some kind of unexpected space character in your payload that is causing an unexpected result.  Because when I then copied that section out of the reference document for POST /rest/api/3/issue again, it then worked as expected.  Try using this instead:

curl --request POST \
--url 'https://[redacted].atlassian.net/rest/api/3/issue' \
--header 'Authorization: Basic [redacted]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"fields":{
"project":{
"key":"GSD"
},
"summary":"sadfasf asfa sfd asfd asf",
"issuetype":{
"id":"10003"
},
"priority":{
"name":"High"
},
"labels":[
"bugfix",
"e-commerce"
],
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "blablalblalbala 6\r\n\r\nqm1c78e294da40:9e67eeb4-bf67-4f63-84ec-28a73e451036ssfsafasfsa fsdgsdfg sdfgsdg",
"type": "text"
}
]
}
]
}
}
}'

 

I realize that the characters seen on the screen might not be different, but I think there is some kind of extra character in your payload or possible the lack of a space character that could be causing this behavior.

Try this and let me know if this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events