Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

REST API - Create issue description from HTML

Joep Oomens
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!
April 30, 2020

I want to create an issue with the API, but I want to (for example) include an image in the description. I'm new to using the API, so the description object is a little weird to me in the first place.

When I retrieve an issue from Jira, the description contains one of more "parts", but how do I get the correct description structure when doing the opposite (HTML / my own content to Jira)? I couldn't find some method in the documentation, so I'm wondering if someone can help me out.

FYI: I'm using PHP and cURL.

1 answer

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2020

Hi @Joep Oomens -- Welcome to the Atlassian Community!

Here is a similar post where someone was trying to add an image to a comment using the REST API.  There appear to be 2 steps: upload the attachment, and then update the markup to use the image.

How can I add an image in a comment?

https://community.atlassian.com/t5/Jira-questions/How-can-I-add-an-image-in-a-comment/qaq-p/952016

 

Best regards,

Bill

David_Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2020 edited

As Bills says and per the other article, you have to attach the image to the issue first and know what its ID is before you can refer to it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events