Hi,
I want to write a piece of code that will create documentation for my software project in a Confluence page. I intend to use the xml-rpc connection to do it. What I am looking for is an API for creating the headings, titles etc. of the content of that page.
I understand the wiki markup text and I have a horrible feeling that it is my problem to just build strings full of {h1} etc rather than work with some nice API to createHeading1()
Any hints?
Thanks very much
Community moderators have prevented the ability to post new answers.
That's very much the case, at least pre-v4. With v4 the format is structured and parseable so there may well be new APIs at least in the pipeline.
But at least in 3.5 I use something like this (soap, not xml-rpc):
def text = getClass().getClassLoader().getResourceAsStream('confluence/default_page.txt')?.text RemotePage pageHome = service.getPage(token, pkey, 'Home') pageHome.content = text service.updatePage(token, pageHome, new RemotePageUpdateOptions(minorEdit: true, versionComment: "Update"))
Thanks for the answer. Ideally I want to build up some kind of DOM and then have the ability to dump the result to Confluence format or other formats such as PDF. It feels like a job for FOP or Velocity or those kinds of projects (that I have not kept up with)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The new format is XHTML so in theory you could use any standard xhtml parser/builder... however I think I read that there is no API to set the XHTML content directly. Could be wrong though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
In Confluence 4.0 you are able to set the content of a page as XHTML by using the version 2 remote API. See https://developer.atlassian.com/display/CONFDEV/Changes+to+the+remote+API+in+Confluence+4.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
question : what service reference should I add to my .NET C# project for implementing this code ?
many thanks
Yafim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is it possible for one of you guys please post code example here to help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The V2 XML-RPC APIs works well. There are no api for creating the xhtml though - but once you have the content in xhtml, you can use the apis to publish to confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.