Hi I am following this syntax https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all&_ga=2.207440784.2044781420.1549987318-2128914256.1539369576
My markdown is coming through except for images. What is the correct format for inlining an image url via the REST api?
Thank you!
Which specific REST API endpoint are you using here?
I tried this with a comment endpoint and it seems to work correctly for me in Jira Cloud.
curl --request POST \--url 'https:// example .atlassian.net/rest/api/2/issue/SCRUM-12/comment' \--header 'Authorization: Basic [REDACTED tokenstring]' \--header 'Content-Type: application/json' \--data '{"body": "Lorem ipsum !https://upload.wikimedia.org/wikipedia/commons/f/f8/Science_2.0_model.png!"}'
In my case it did show a remote image as an inline comment in my Jira issue.
I am interested to learn more about what your comment/description/text field ends up looking like, what endpoint you're using here, and perhaps there is a problem with renderer for the field in question to display this info.
Thanks so much for the reply and sorry for the delay!
This does in fact work for the comment endpoint, but why does it not work for the description field? I have the wiki renderer set on that field.
Thanks again,
Jono
Hi Jono,
I tried this again in my test since, this time to update a description field, and it worked for me. My syntax was:
curl --request PUT \--url 'https:// example .atlassian.net/rest/api/2/issue/SCRUM-11' \--header 'Authorization: Basic [redacted]' \--header 'Content-Type: application/json' \--data '{"fields": {"description": "Lorem ipsum !https://upload.wikimedia.org/wikipedia/commons/f/f8/Science_2.0_model.png!"}}'
A few questions for you:
If you're using the same endpoint and same payload but still getting different results, then I would want to know more about your Jira Cloud site to try to understand what is different here.
Andy
Thank you for continuing to look!
I am using 3LO so my endpoint looks like this:
https://api.atlassian.com/ex/jira/[CLOUD_ID]/rest/api/3/issue
and my data payload looks like this (apologies for formatting and it's copied from my ruby code)
body = {"fields" => {"project" => {key: params['project']['value'],},summary: params['summary'],"description": {"type": "doc","version": 1,"content": [{"type": "paragraph","content": [{"type": "text","text": desc}]}]},"issuetype": {"id": params['issuetype']['value']}},}
It looks like you're new here. Sign in or register to get started.