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

How to get the full content of the article and not just the excerpt.

marcelo February 25, 2020

Hi, i'm working with the Jira Service Desk API and want to get the full content of my knowledge center articles.

There is a way to expand and get the full content?

Or if not, reading the Article URL and innerHTML the content we receive a CORB - Cross-Origin Read Blocking for the images, there is also a way to whitelist our domain or workaround this situation?

Thanks in advance.

Marcelo.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2020

Hello @marcelo ,

If I understand correctly you are calling one of the service desk REST API endpoints to get articles and you want to get the full article content instead of only an excerpt:

Is this correct?

If this is correct then I the example response in the documentation I can see that a URL with the full article content is already returned in the response itself, under the "content" property:

  "values": [
    {
      "title": "Stolen computer",
      "excerpt": "assuming your computer was stolen",
      "source": {
        "type": "confluence",
        "pageId": "8786177",
        "spaceKey": "IT"
      },
      "content": {
        "iframeSrc": "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8786177"
      }

 

For above example, in order to get the whole content it would be enough to call:

 

Another option would be to call the Confluence REST API endpoint to get content by ID (providing the pageId from above response). 

 

For details please see:

 

Cheers,
Dario

Marcelo Carneiro
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!
July 8, 2020

Hi Dario, thanks for your message, and sorry take so long to reply.

What we want to achieve is to read the content and not just load the content URL that we receive back in an IFRAME.

For this specific case, we already have it working. But remains a problem with the images as we receive a CORB while reading the image's link.

About the CORB issue is because Atlassian needs to add a HEADER property to allow the third-party to read the images when not embedding the content via IFRAME.

https://stackoverflow.com/questions/50873764/cross-origin-read-blocking-corb


Not sure if Atlassian can add it or even if they want us to be able to read the images like we're doing now.

Thanks a lot in advance.


Best regards, 

 

Marcelo.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2020

Hi @Marcelo Carneiro ,

Embedding Jira or Confluence in an iFrame is indeed not supported:

 

I am not sure there is a way to workaround this but I believe you might have better chances to find a workaround for this issue if you either Ask the Developers Community or Create a Developer Support Request.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events