Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

REST API for confluence

Project description

Simple python script to use a Atlassian Confluence Wiki via the CLI.


$ python --help
usage: [-h] -w WIKIURL -u USERNAME -p PASSWORD

Confluence wiki API

positional arguments:
    addpage             Add a page
    copypage            Copies a page
    updatepage          Update a page
    listpages           List pages in one or all spaces
    removepage          Remove a page
    getpagecontent      Get page content
    getpagesource       Get page source
    getpagesummary      Get page summary
    getattachments      Get a list of all attachments
    getattachment       Get a specific attachment
    listspaces          List all spaces
    addspace            Add a space
    removespace         Remove a space
    adduser             Add a user
    removeuser          Remove a user
    deactivateuser      Deactivate a user
    reactivateuser      Reactivate a user
    changeuserpassword  Change user password
    addgroup            Add a goup
    removegroup         Remove a goup
    listgroups          List all goup
    listusers           List all users
    getallpages         Save all pages to local files.
    addusertogroup      Add user to a group
                        Remove user from a group
    listusergroups      List groups user is in
    pagesbylabel        Pages by Label

optional arguments:
  -h, --help            show this help message and exit
  -w WIKIURL, --wikiurl WIKIURL
                        Wiki URL (only FQDN, no / and such)
  -u USERNAME, --username USERNAME
                        Login Username
  -p PASSWORD, --password PASSWORD
                        Login Password


Add page:

$ ./ --wikiurl="" -u "api" -p "" addpage -f ./content.txt -n "CLI New Page" -s "RAY"

Remove Page:

$ ./ --wikiurl="" -u "api" -p "" removepage -n "CLI New Page" -s "RAY"

Update Page:

$ ./ --wikiurl="" -u "api" -p "" updatepage -f ./content.txt -n "CLI New Page" -s "RAY"

Get page content (HTML):

$ ./ --wikiurl="" -u "api" -p "" getpagecontent -n "CLI New Page" -s "RAY"
<h1>Table of Contents</h1>
<p><ac:macro ac:name="toc" /></p>

Add Space:

./ --wikiurl="" -u "api" -p "" addspace -n "New Space" -s "NS"

Remove Space:

./ --wikiurl="" -u "api" -p "" removespace -s "NS"

List all spaces:

$ ./ --wikiurl="" -u "api" -p "" listspaces
NS, New Space,
ITS, IT Staff,

Add user:

$ ./ --wikiurl="" -u "api" -p "" adduser -U "newuser" -N "New user" -E "" -X "password"

Remove user:

$ ./ --wikiurl="" -u "api" -p "" removeuser -U newuser

Deactivate user:

$ ./ --wikiurl="" -u "api" -p "" deactivateuser -U newuser

Reactivate user:

$ ./ --wikiurl="" -u "api" -p "" reactivateuser -U newuser

For more actions, run ./ -h or see the usage section above.

More info

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for confluence_rest, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size confluence_rest-0.1.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page