Confluence Rest API v2: Get footer NESTED comments for page

Hi,
I’m trying to get all comments for a page with v2 API but the endpoint /wiki/api/v2/pages/{id}/footer-comments do not return nested comments.
The workaround is to download all comments using /wiki/api/v2/footer-comments and then match them by page_id but It looks a bit overhead.

I saw that v1 has the field _expandable → children but there is nothing similar in v2.

Am I missing something?
Is there any way to get the nested comments with the first endpoint?

Confluence REST API v2 does not provide an endpoint that directly returns nested comments for a specific page in a single request. The /wiki/api/v2/pages/{id}/footer-comments endpoint, as you’ve observed, only retrieves the top-level comments. This might require additional requests to get the nested comments. As you rightly mentioned, the following approach can be used:

Initial Request for Top-Level Comments: Use the /wiki/api/v2/pages/{id}/footer-comments to get the top-level comments for the page.

Fetch Nested Comments: For each comment retrieved in the first step, you may need to make additional requests to /wiki/api/v2/footer-comments

This approach may introduce some overhead as it involves multiple API calls, especially if there are many comments and layers of nesting.

1 Like

I didn’t realice this endpoint exists https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment/#api-footer-comments-id-children-get maybe can be clarified in the documentation of get pages, I can then download all nested comment but with this overhead, making a API request for each comment to see if it has children…

Thanks @DeepakPandey