You can interact with the Wiki of each project through the API.

Getting the DSSWiki object#

You must first retrieve the DSSWiki through the get_wiki() method

project = client.get_project("MYPROJECT")
wiki = project.get_wiki()

Retrieving and modifying the content of an article#

article = wiki.get_article("article_name")
article_data = article.get_data()

# Modify the content of the article data
current_markdown_content = article_data.get_body()
article_data.set_body("# My new Markdown content")

# And save the modified content

Deleting an article#

article = wiki.get_article("article_name")

Getting the list of all articles#

This prints the content of all articles in the Wiki

for article in wiki.list_articles():
        print("Article: %s" % article.article_id)
        article_data = article.get_data()

Uploading an attachment to an article#

After upload, the attachment can be referenced through the Markdown syntax

article = wiki.get_article("article_name")

with open("myimage.jpg") as f:
        article.upload_attachment(f, "myimage.jpg")

Moving an article in the taxonomy#

You can change the parent of an article

settings = wiki.get_settings()
settings.move_article_in_taxonomy("article_name", "new_parent_of_the_article")

Changing the home article of the wiki#

settings = wiki.get_settings()

Reference documentation#, project_key)

A handle to manage the wiki of a project, ...)

Global settings for the wiki, including taxonomy., ...)

A handle to manage an article

A handle to manage an article