How to update a page from python?

Sean Ochoa November 8, 2012

I've got a functional testing daemon that verifies the status of a specific environment. I would like it to programmatically update a confluence page with the results of the test, each time the test is run. Is that possible?

If so, then how can I do it in Python?

And, if not in Python, is there an example in Java that I can use as a starting point?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2012

There are plenty of examples, just google for it, anyway - here is one

import xmlrpclib

CONFLUENCE_URL='http://localhost:8280/wiki/rpc/xmlrpc'
client = xmlrpclib.Server(CONFLUENCE_URL,verbose=0)
authToken=client.confluence2.login(CONFLUENCE_LOGIN,CONFLUENCE_PASSWORD)

page = client.confluence2.getPage(authToken, pageid)
page['content'] = newcontent
client.confluence2.storePage(authToken, page)
client.confluence2.logout(authToken)

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2012

Confluence Command Line Interface has the storePage action. Construct a command string and run :).

TAGS
AUG Leaders

Atlassian Community Events