I am trying to do a post request on my companies confluence to make a page using the REST API.
When I attempt to do it, I get a JSON response saying that it is forbidden.
I am able to make a page from the GUI, but not with the REST Api.
I have done Basic Authentication for the query.
Below is a picture of the request and the response.
My Question : how can I make the page on the confluence space with the rest Api?
I have tried: making a personal access token. And then using it with my request, but that didnt work either.
Can you try below API and let me know the result
curl -u username:password -X POST -H 'Content-Type: application/json' \
-d '{"type":"page","title":"new page", "ancestors":[{"id":1638403}], "space":{"key":"SPACE_KEY"},"body":{"storage":{"value": "<p>This is a new page</p>","representation":"storage"}}}' \
http://confluence-site-url/rest/api/content
Thanks,
Pramodh
Here's a link for Ref
https://developer.atlassian.com/server/confluence/confluence-rest-api-examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.