I haven't used REST services in combination with JSON-RPC that much, so I could use some help here.
I am trying to add an attachment to a page in Confluence using a JSON-RPC call. I am testing my calls using soapUI 5.0.0.
The URI of my REST call is:
https://{sitename}/rpc/json-rpc/confluenceservice-v2/addAttachment
I have constructed the following JSON code, which should create a very simple text file:
[ 2339970
, { "fileName" : "Testfile.txt"
, "contentType" : "text/plain"
, "comment" : "to be ignored"
}
, "VGhpcyBpcyBhIHRlc3QuClRvIENvbmZsdWVuY2Ugb3Igbm90IHRvIENvbmZsdWVuY2U/Cg=="
]
The third parameter is a base64 encoded string.
Unfortunately I get an error message from the server:
<error>
<code>-32602</code>
<data null="true"/>
<message>Request parameter types did not match method parameter types (method addAttachment taking 3 parameters)</message>
</error>
Any idea what I'm doing wrong here?