Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table of contents is not returned by API call

Deborah Delzell October 7, 2021

We are using the content endpoint to pull content from Confluence in to our application.  An example call is:  https://reflex-confluence.hannover-re.com/rest/api/content/91783664?expand=children.page.

I am using the table of contents macro on the confluence page and would like these links to show up within our application, but they are not returning.

I'm also using the Children Display macro, and links to the child pages are showing up.

I'm hoping someone can help us figure out how to get the table of contents bac.

Thanks.

 

2 answers

2 accepted

0 votes
Answer accepted
Kishan Sharma
Community Champion
October 9, 2021

Welcome to the Atlassian Community @Deborah Delzell 

This seems to be a bug, you can refer it here. I would recommend you to vote for that issue and watch it for updates (you might have to login with your atlassian account to perform those activities)

Deborah Delzell October 9, 2021

Thanks Kishan!  I will do that.

0 votes
Answer accepted
Dominic Lagger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2021

Hi @Deborah Delzell 

I just tried myself and found the following:

For the body content, you have to use this:

<<URL>>/rest/api/content/144506976?expand=body.storage

You can choose between these expand options:

  • body.storage
  • body.view

Both do not render the TOC macro. I search in the net, but did not found any solution to get the rendered TOC.

Hope this helps nevertheless.

Regards, Dominic

Deborah Delzell October 9, 2021

Thanks Dominic!

Deborah Delzell October 9, 2021

@Dominic Lagger I took a look at the bug that @Kishan Sharma found.  It is from 2016 and has a low priority.  The bug is attached to an even earlier bug https://jira.atlassian.com/browse/JSDSERVER-3565.  I find it hard to believe that others have not raised the concern.  Having a table of contents is important when pulling content from Confluence. 

Other than voting -- which I did (but there are only 6 votes), are you able to recommend the best way to ensure this issue gets visibility by the Atlassian Confluence team?

Dominic Lagger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2021

Other than voting, I do not think that you can do much...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events