Via Python and the "requests" package, using the REST API, I've written scripts to read and write the contents and add attachments to Confluence pages in a particular workspace. Before each transaction, my code verifies that a page of the proper title exists within the workspace by retrieving all the page titles, using the syntax:
my_url/rest/api/space/<spacekey>/content?type=page&limit=25&start=0&expand=space,version
I call this iteratively, incrementing the start by 25 until the number of returned items is less than 25. I look for the desired page title within the set of titles returned. A total of 276 page entries are returned.
For a few new pages, the above logic is failing to find the page title within the space. HOWEVER, the page is visible within the Confluence GUI, apparently in the right place, and if my script ignores the error it can indeed read and write contents and add attachments to the page!
I investigated by comparing the list vs. the set of all page titles returned by the above logic. What I found was a number of duplicate page titles, and the number (about 60 or 70) and page titles of the duplicates varied each time I ran the script. It seems as if Confluence is getting confused about the indexing of pages when I'm retrieving them by start number... or I've made some weird error.
Has anyone seen a similar issue?