Root page ID returned by REST API has errant space at end

I’m using PowerShell’s Invoke-RestMethod cmdlet to interact with the Confluence Server REST API to create new pages in a space, below the space’s root page, and have found something strange.

When I make the GET call to the URL http://{OurConfluenceCloudInstance}/rest/api/space/{SpaceKey}/content/page?depth=root the returned set of objects contains all the values, but the ID value has an extra, blank character at the end for no apparent reason.

For example, I know the root page in a particular space has the ID “54002074” but the ID value returned by the REST API is "54002074 " (note the extra space at the end). I have to trim off the errant character before the value can be re-used as the id value for the ancestor object when creating a new page.

All pages created below the root page using the REST API are having their ID properly reported back by the REST API and there is no extra space in their ID’s value being returned.

Can anyone else replicate this issue. I’ve tested it on both our live v6.3.4 and QA v6.9.0 instances and both have the same issue.

Hi @sunnyape,

Can you raise a bug report on DEVHELP with this issue?