Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problems with basic page generation with Python and Confluence API

Hi,

 

I try to generate my first Confluence page with following code:

 

from atlassian import Confluence

...

confluenceBaseUrl = myConfluenceBaseUrl
pageId = ...

print("connect to confluence ...")
confluence = Confluence(url=confluenceBaseUrl,username=myuser,password=mypass)

status = confluence.create_page(
    space='TEST',
    parent_id=pageId,
    title='Made by Python',
    type='page',
    body='This is the body')

As a result I get:

    requests.exceptions.HTTPError: Could not create content with type page

I have write access to the parent page and user and pass are checked. What am I doing wrong?


I hope this is the right place to ask for this.

1 answer

SOLVED.

 

It was a problem with the name of the SPACE, that has to exist - this was not clear to me.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

38,515 views 28 126
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you