JSON-RPC storePage/getPage not working properly

I thought I had a problem using storePage, because it did not return any results. Having abandoned the idea that the JSON-RPC method should return the RemotePage instance, I focused on using getPage right after the storePage to get the ID for the newly-created page. I am not getting any content in my reply. Below are the two calls that I am using from a Linux shell:

curl --trace - --basic -u <username>:<password> --data '{"jsonrpc":"2.0","method":"storePage","params":{"space":"CLI","title":"Test Organization 2","content":"Some Content","parentId":25886799}}' -H "Content-Type: application/json" https://confluex.atlassian.net:443/wiki/rpc/json-rpc/confluenceservice-v2

curl --trace - --basic -u <username>:<password> --data '{"jsonrpc":"2.0","method":"getPage","params":{"spaceKey":"CLI","pageTitle":"Test Organization 2"}}' -H "Content-Type: application/json" https://confluex.atlassian.net:443/wiki/rpc/json-rpc/confluenceservice-v2

Both of those commands returns a zero-byte response. However, the storePage actually creates the Wiki page exactly where I want it. Am I doing something incorrectly?

We have an OnDemand instance of Confluence.

1 answer


We are also an OnDemand customer, I was testing out the Confluence JSON-RPC API today and saw exactly the same problem as you did, zero-byte response from pretty much any of the methods that I tried (including "getSpace").

However, I just tried using the "light protocol" as mentioned in the docs https://developer.atlassian.com/display/CONFDEV/Confluence+JSON-RPC+APIs#ConfluenceJSON-RPCAPIs-TheLightProtocoland that seemed to work for me.

Not sure why one works but the other doesn't, maybe a bug?

(Also FYI, I remember reading on some Google result that the "spaceKey" parameter name was actually a typo and it should be just "space" but that didn't seem to matter, nothing with the "heavy" protocol in OnDemand seems to work right for me at least.)

HTH, it would be nice to hear from Atlassian if there is some kind of problem in OnDemand with this or whether we are doing something wrong.


Thanks, Steve. It will take me a little while to get back to this project, but I am interested in trying your suggestion. I'll let you know if this works out for me.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,143 views 20 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you