Skip to content

Instantly share code, notes, and snippets.

@hmain
Created November 20, 2018 15:12
Show Gist options
  • Save hmain/fca3be4410fce722923e7fcad783971a to your computer and use it in GitHub Desktop.
Save hmain/fca3be4410fce722923e7fcad783971a to your computer and use it in GitHub Desktop.
Create a confluence page from python
#!/usr/bin/env python
from jira import JIRA
import argparse
wiki_url = "https://" + server + "wiki/rest/api/content?user=" + email + ":" + apikey
encoded_body = json.dumps(jsonfile)
headers = { 'Content-type': 'application/json', 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' }
http = urllib3.PoolManager()
r = http.request('POST', wiki_url, headers={'Content-Type': 'application/json'}, body=encoded_body )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment