Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

REST API returns errant space char at end of root page ID value

Edited
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 01, 2018

I've found what I think might be a bug in Confluence Servers v6.9.0 and 6.3.4

When you use the REST API to query the root page to get its ID (using a GET to the URL https://{MyServer}/rest/api/space/{SpaceKey}/content/page?depth=root ) the value returned for the id has an errant extra space after the numerical value. IE, if the root page's id is 12345678, as shown via the Page Information page, the value returned by the API is "12345678 "

That extra character needs to be removed if the id number is to be used in subsequent REST API queries to create pages with the root as the ancestor.

Can anyone else confirm this issue?

2 comments

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 01, 2018 • edited

Hmmm. It seems to be an issue with the environment I'm using to submit the REST API calls.

I'm using PowerShell and the Invoke-RestMethod applet to handle parsing all the JSON, but when I make the same call to the API using other REST tools and methods, the errant space doesn't seem to be there.

I've just done some more testing and decoded the errant character to its ASCII value, and it comes back as 32, so it's definitely a space.

What's weird is that I use Invoke-RestMethod to interact with the REST API of both Jira and Confluence for lots of other things and no other returned value has this issue. It seems to be some issue with how Confluence is encoding the response in UTF8.

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 02, 2018

I'm going to raise this as a bug with the Atlassian devs and see if they can advise of the cause.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events