Hi there, I am trying to create an issue using Jira REST API. I want to set description as a codeblock that should be rendered as below:
The above issue is created using UI and description is rendered as it should be.
But I am unable to do the same thing using REST API.
Here is how my description looks like:
{code:title=POST /api/v1/system/alarms/d475-4ccd-aab9-0474bc285a38/acknowledge}
Status code: 409
Payload: null
Response: {
"code": 24,
"codeDesc": "NCERRConflict: Failed due to a conflict with the current state of the target resource"
}
{code}
This is how my request payload looks like:
payload = {
"fields": {
"summary": summary,
"issuetype": {
"name": issue_type
},
"project": {
"key": project_key
},
"description": {
"type": "codeBlock",
"content": [
{
"type": "text",
"text": description
}
]
}
}
}
But I am getting an error:
{"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":{}}
Please tell me where I am making the mistake.
Hi @Prasang Singhal -- Welcome to the Atlassian community!
I believe that formatting may not work at this time. Please see this defect to see if it matches the issue you are seeing: https://jira.atlassian.com/browse/JRACLOUD-72071
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.