Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a new page using json-RPC on Pyhton.

Dominik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2017

I do it so.

import requests
import json

session = requests.Session()
session.auth = ('name', 'pass')

headers = {'content-type': 'application/json'}
page = {"space": "~spacekey", 'title': 'title', 'content': 'content', "parentId": 1234567}
payload = json.dumps({"jsonrpc" : "2.0", "method": "storePage", "params": [page], "id": 1})
response = session.post('https://example.com/rpc/json-rpc/confluenceservice-v2', headers=headers, data=payload)

But that's not enough. I need to create a page using a template.  Using 'templateId=123456789'

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, marketing templates, confluence templates, marketing project management, content strategy, campaign planning, marketing collaboration, confluence for marketers, atlassian learning, marketing workflows, confluence best practices

5 must-use templates for Marketing teams (from a Confluence Marketer!) 👩🏻‍🎨

Who doesn’t love a good template? We sure do! Check out our top template picks for Marketing teams who want to streamline their processes, enhance collaboration, and take their marketing to new heights.

Read more 📚
AUG Leaders

Atlassian Community Events