You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello Confluence Experts,
I have a use case wherein I need to import a MS Excel data into Confluence.
One excel row needs to be created as one new page and columns in that excel needs to mapped/linked to another existing static pages in the the same Confluence space.
By reading some Confluence docs, I got to know that I might need to create a new custom User Macro to perform this import.
Can any expert guide me further Or if someone working on similar macro help me out to do it fast?
Thanks in advance.
Thanks for your valuable suggestion.
Do you have any sample script calling Content creation APIs of Confluence?
If yes, that would be really great.
Thanks..!!
this is a main part of creating a new page in confluence
mypage = {"type":"page","title":""+NEWPAGENAME+"","ancestors":[{"id":PARENTID}],"space":{"key":""+SPACEKEY+""},"body":{"storage":{"value":"" + PAGE_IN_STORAGE_FORMAT+ "", "representation": "storage"}}}
post = requests.post(url+'/rest/api/content/', data=json.dumps(mypage), auth=auth, headers=headers, verify=False)
newpageId = json.loads(post.text)['id']
You need auth and headers:
headers = {
'X-Atlassian-Token': 'no-check',
'Content-Type': 'application/json'
}
auth=(user, password)
This is written in python
Regards, Dominic