As part of our automated process of continuous delivery, we would like to generate documentation for our product and publish it to confluence. I'm want to use a maven plugin, so this part of the process can be easily called by any team member or jenkins build. This is the plugin (see https://github.com/bsorrentino/maven-confluence-plugin ) This plugin is great for a java project, to keep documentation in sync with code. That can be a great tool for us and tech pub, our customer etc.
This use an API of confluence, xml rpc, that is deprecated for confluence 5.5 (see https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis ) Quoting this page : The XML-RPC and SOAP APIs are deprecated since Confluence 5.5.
So first question, is this API available in our confluence server ?
I tried using the REST API https://developer.atlassian.com/confdev/confluence-rest-api but I can only have successful read, no write. I was not able to create a document using my own user account/password in this API.
So second question, is there something preventing me to have write access through REST API ?
Do you see a solution to my problem of being able to automatically create document in confluence ? Maybe there is another way that you already know, or maybe this isn't allowed.
Thanks for taking a look!
The SOAP APIs are deprecated, but still available and will remain so until equivalent REST APIs are in place. There are quite a few SOAP capabilities missing. If there is a REST API available for the function you want, best to use that, otherwise use the SOAP APIs. If you are just creating pages, the REST APIs should be sufficient.
The Confluence Command Line Interface (CLI) is an alternative for this type of use case. It uses a combination of REST or SOAP APIs to provide various actions - see Reference. Moreover, if you are a Bamboo user (I know you referenced Jenkins), it is even easier to integrate using the Confluence CLI task. For Jenkins, you would need to install the client on your Jenkins server and just use command scripting.
Thanks for your answer!
Could you please comment this statement?:
So you are telling me that the xml rpc API, besides being deprecated, is still available ? If this is correct, then the maven plugin I'm using should succeed. This plugin can't use Confluence Command Line Interface nor Confluence REST API. So if the xml rpc api is available for us, it should do the trick.
This morning, 9H47 am my time (France) I tried to create page and I got the following : [INFO] Confluence version [5.5.4-5517] development version [false] [ERROR] has been imposssible connect to confluence due exception org.codehaus.swizzle.confluence.ConfluenceException: java.lang.Exception: com.atlassian.confluence.rpc.RemoteException: You're not allowed to view that page, or it does not exist.
The credentials I'm providing are mine (username and my password) and seems correct because I have a different error when using another password or login.
Can you tell me why this was not allowed ?
Yes, they are available (provided they are enabled - https://confluence.atlassian.com/doc/enabling-the-remote-api-150460.html) and your error message indicates that you are connecting and just getting an error message: You're not allowed to view that page, or it does not exist.
You will need to sort that part out on your own.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Community, Jessica here from the Confluence Product Marketing team! July’s community challenge is all about sharing pictures — and as an extension of our first post on what ...
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!
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