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.
Hi,
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.
-steve
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.