Create smart links via Jira API

I’m creating issues via the Jira REST API. They have Figma links in them but they’re not being rendered as Smart Links. It’s showing up as just a regular link.

Is there a way to trigger the Smart Link to be generated when creating issues via the API?

@AlexChumbley, welcome to the Atlassian developer community.

Yes, it is possible.

  1. Create issue using GET /rest/api/3/issue/{issueIdOrKey}
  2. Send a description in Atlassian Document Format.
  3. Use the inlineCard node as the Smart Link.

An issue payload might look something like the following:

{
  "fields":{
    "project":{
      "key":"NGEW"
    },
    "issuetype":{
      "id":"10308"
    },
    "summary":"inlineCard is a Smart Link",
    "description":{
      "type":"doc",
      "version":1,
      "content":[
        {
          "type":"paragraph",
          "content":[
            {
              "type":"inlineCard",
              "attrs":{
                "url":"https://devpartisan.atlassian.net/browse/NGEW-1"
              }
            }
          ]
        }
      ]
    }
  }
}

Hey @ibuchanan this solution worked great for our team and users until yesterday. We were using this endpoint (https://api.atlassian.com/pf-editor-service) to convert b/w markdown <> Atlassian Document Format. Seems like it went down yesterday and the support team said the pf-editor-service endpoint is being decommissioned. Would it be possible to open source the code? It’s been very valuable to our users

NOOO! The pf-editor-service endpoint has been a godsend for me for converting various content to ADF format, and its sudden demise is bad news for me too.

@ibuchanan
The purpose and use of that endpoint was never really explained anywhere. It would be really, really, really great if Atlassian would make a public announcement as to what it was for and what, if anything, it will be replaced with. In the absence of good open source tools or cross-language libraries for creating or converting ADF content, it really is a outlier standard that can be painful to deal with.

@AravindhDorai and @sunnyape,

You have my sympathies. I’ve been making a case that ADF needs better developer tooling. I haven’t found any commitment to fixing that problem yet.

In the specific case of pf-editor-service, I can only tell you the official Atlassian position is that endpoint is not documented; hence, it is unsupported.

Got it @ibuchanan. If it’s not possible to support it as an endpoint, would the team be willing to open source the code? Thank you

@AravindhDorai

A slightly outdated version of the code is available in the public atlaskit repo:

Also, I have created a Feature Request to have a public REST API endpoint to convert among formats:

You may want to vote and watch the above feature request so that you will get notified in case of any update. The feature will be addressed according to the Implementation of New Features Policy.

Cheers,
Dario

1 Like