Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Submit request in JIRA API with multiline value

I want my issue description in formatted way so passing multiline value in JIRA API request but it throws error as BAD Request. What is best way to handle this?

{
    "fields": {
       "project": { "key": "TES" },
       "summary": "This is user story",
       "description": "As a 
                       I want   
                       So that  
 Acceptance Criteria: 
 When 
Invoke browser with url
 And
Enter text ABC in field User ID.
 And
Enter password 1234 in field Password 
 And
Click On Submit",
       "issuetype": { "name": "Story" },
       "priority":{ "name":"High" }
   }
} 

 

2 answers

1 accepted

0 votes
Answer accepted

Hi @Rajeev Ranjan 

Have you tried to put in new-line \n characters, or other escaped formatting?

Best regards,

Bill

yes and still says Bad request.

Per this article, that should work:

https://confluence.atlassian.com/jirakb/how-to-insert-a-new-line-when-using-lines-the-jira-core-rest-api-779160736.html

Would you please post what you are trying with the newline included?

Like Rajeev Ranjan likes this

I got solution. This packet was coming from different source and description value was having '\n" character but it was throwing Bad request but when I changed that value as "\\n" then it started working. Thanks

Like Bill Sheboy likes this

Hi @Rajeev Ranjan , I believe you need to submit the description as an ADF (Atlassian Document Format) object, see https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/.

So for `description`, you'd need to submit something like

Screen Shot 2021-05-11 at 10.38.10 pm.png

Suggest an answer

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you