Skip to content

Commit a6d0f2f

Browse files
[Confluence] Add option to create draft page
1 parent f146a9b commit a6d0f2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

atlassian/confluence.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ def create_page(
793793
representation="storage",
794794
editor=None,
795795
full_width=False,
796+
status="current",
796797
):
797798
"""
798799
Create page from scratch
@@ -804,13 +805,15 @@ def create_page(
804805
:param representation: OPTIONAL: either Confluence 'storage' or 'wiki' markup format
805806
:param editor: OPTIONAL: v2 to be created in the new editor
806807
:param full_width: DEFAULT: False
808+
:param status: either 'current' or 'draft'
807809
:return:
808810
"""
809811
log.info('Creating %s "%s" -> "%s"', type, space, title)
810812
url = "rest/api/content/"
811813
data = {
812814
"type": type,
813815
"title": title,
816+
"status": status,
814817
"space": {"key": space},
815818
"body": self._create_body(body, representation),
816819
"metadata": {"properties": {}},

0 commit comments

Comments
 (0)