atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

[Confluence] Get pages from space key #1360

Open AlokRanjanSwain opened 2 months ago

AlokRanjanSwain commented 2 months ago

There is a limit of 100 pages from a particular space. How can I loop over so that I can get all the pages including child pages from that space.

For my space If I give start point as 100 to test, it is throwing 502 bad gateway error.

conf.get_all_pages_from_space_raw(space="MySpace", start=100, limit=100000, status=None, expand="body.storage", content_type='page')

HTTPError: 502 Server Error: Bad Gateway for url: https://wiki.company.cloud/rest/api/content?spaceKey=MySpace&start=100&limit=100000&expand=body.storage&type=page

Can I know why is this error coming , and How to resolve this.

Spacetown commented 2 months ago

@gonchik I think the paging should be implemented at global level with a generator as I did it for BitBucket. The problem is the different key for the next page. Have you an idea how to solve this in a generic way?