How to show description text in Visual Format instead of text while creating issue Using Rest Call

Hi
I am Using JIRA cloud rest api for creating an Issue . Isue Crested Successfully But The description Field is Showing As text format I am using wiki renderer for displaying description. But that is showing only in text format not in VISUAL.

 "description": {
      "type": "doc",
      "version": 1,
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "text": "h1. Hi Ths is _chakresh_ from *Kanpur*",
              "type": "text"
            }
          ]
        }
      ]
    }

I passed data like this for description Field . In place type:text I tried type:HTML also but not working.
Any Suggestion on how can we show data as Visual Format.
Thanks.

1 Like

Hi,
You should use the v2 version of the REST API instead of v3. V2 supports passing the description as wiki text, not V3 which relies on the new ADF document format.

1 Like

Hi @david2
Thanks for Response I tried for v2 but then the same request body which is working in v3. is throwing Error.

  "errors": {
        "description": "Operation value must be a string"
    }

Do you have any working example for this please suggest me that.
I passed

 {
              "text": "h1. Hi Ths is _chakresh_  *Kanpur*",
              "type": "text"
            }

and tried wiki also in place of “text” but not working. Can u suggest me how to do that?
Thanks.

1 Like

You need to pass just the string:
description: "h1. Hi"

1 Like

Thanks @david2
For Your help now Issue Fixed.

1 Like

@david2 Is there any way of doing this with version 3? I’m currently looking to format the ticket’s description that I have created using Jenkins, Nodejs & Axios but no luck so far.

Nope, you need to use the V2 API. The V3 API uses the ADF format, which is a JSON representation of rich text.

1 Like