I have not been able to find a solution for embedding an already attached image as a thumbnail through the Jira Cloud Rest API.
When I do a GET of the end state of a similar issue I get, the following content with the description field of the issue
```
{
"type": "mediaSingle",
"attrs": {
"layout": "center"
},
"content": [
{
"type": "media",
"attrs": {
"id": "df51bfa5-6a56-4846-8ee4-c5e08313d741",
"type": "file",
"collection": "jira-39581-field-description",
"width": 200,
"height": 183
}
}
]
}
```
The issue is I am am not sure how to create or update an issue with this content in my description. For an input I would only have the attached image for example: "example.png" which is attached. Some of the fields in the GET id and collection are render magically somewhere.
Any one have success including a thumbnail via the REST API. To clarify, the thumbnail to include in the issue description is successfully attached to the issue.
Cross posted: https://community.developer.atlassian.com/t/picture-thumbnail-through-jira-rest-cloud-api/37967
For anyone running into the same issue version 2 of the rest API lets you enter a string directory into the description field, which solves this problem.
Borrowing from:https://community.atlassian.com/t5/Jira-questions/Wiki-style-renderer-image-formatting-not-working-via-REST-api/qaq-p/1005705
did work. Note that it is api/2 an don't api/3
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!"}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.