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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
When I run requests against this endpoint:
"https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment"
I get various errors (403 for PUT and 500 for POST).
Can we have a working example for using this endpoint to upload a file to a confluence page please. E.g Upload `example.txt`.
Ideally Python but cURL should be fine either.
I am able to run get requests against the same endpoint and successfully return attachments, so I don't think there's an issue with my API key or permissions.
For context, I created the page and am able to edit it through my browser.
Hi @Llyr Jones
Welcome to the community!
Ideally, it should be POST method.
It could be that the REST API could not find the file that is being attached. I have not tried it in Python but used third-party application like Postman.
If you don't mind, can you list the complete curl command here (after hiding your Confluence domain, of course).
Thanks,
Vamsi
I'm using Postman but here is the cURL generated from my request
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Llyr Jones
Is the attachment file in the same location from where you are executing this curl command?
Can you check this reference article: https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-post and try out the example given?
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.