Issues Paging with Confluence Rest API

Hi, I am trying to pull data into my EazyBi for JIRA using the Confluence REST API. I can pull the data I need and have the mapping all done but unfortunately I cannot find a way to get paging working. Confluence’s Rest API uses the _links.next property of the results to provide the URL of the next page. This URL comes in as a relative URL but it is missing the first part of the path. Example:

Confluence Rest API URL: “https://company_name.atlassian.net/wiki/rest/api/content/search?..”

The result contains the following _links.next property: “/rest/api/content/search?..”

Notice the missing “/wiki” from the beginning of the _links.next result. Currently I get a 404 error because EazyBI cannot get results past the first page. Is there any way to resolve this issue so that I can page through the Confluence Rest API? Thanks!

Hi @Eddie ,

We had a lengthy conversation in the eazyBI support channel. I will share the essence here for other community members that encounter the same problem.

You correctly noticed that the “/wiki” part is missing when eazyBI looks for the next page link. The Confluence Cloud API next page URL links.next property: /rest/api/content/search?.. doesn’t have the full URL in it. It holds the base URL and context in separate properties.

When the entire URL is missing from the next page parameter, eazyBI falls back to the domain URL, https://company_name.atlassian.net, and the /wiki part is ignored, as it is not part of the base domain.

To analyze the Confluence data, I recommend looking into eazyBI for Confluence - Atlassian Marketplace.

Best,
Roberts // support@eazybi.com