Hi,
I am trying to create page using python requests module and getting 415.
here is my python function :
def create_page(contenturl, headers):
create_page = { "type": "page", "title": "test", "space": {"key": space_key}, "ancestors": [{"id": parent_page_id}], "status": "current", "body": { "storage": {"value": "This is a new page", "representation": "storage",} }, }
response = requests.post(contenturl, data=create_page, headers=headers) print(response.status_code)
here are my headers:
headers = { "accept": "application/json", "authorization": "Basic %s" % encoded,}
I do not see authorization is issue here because that i am able to make get content and delete page calls. I have tried adding "X-Atlassian-Token": "no-check" but still gets 415. My user also has full access to write and read.
any help appreciated.
Regards
Sukh