I am a little confused as to how to use the Confluence API. I am trying to use the API in order to create a new page in Confluence at the web address confluence."mycompany".com and post information onto that page in a space, but I don't think I understand how to do that with this API. If anyone can help me out, that would be great. Thank you!
Hi @Julia ,
Welcome to the community!
I'm guessing that your company uses Confluence server (as opposed to Confluence Cloud), so my answer is based on that.
Using the REST API is the easiest way to programmatically access and work with data in Confluence, so you are on the right track! The best way to get started is – in my opinion – to look at the REST API examples here and try them for yourself. They even have an example on how to create a new page!
If you happen to like the Python programming language, I can recommend this module.
Hope that helps to get you started,
I've taken a look at those documents for the REST API in addition to this https://docs.atlassian.com/ConfluenceServer/rest/7.5.1/ and just am not sure about a couple of things.
Is "localhost:8080" the server that my company is using? If so, where would I be able to figure out which port to use?
@Julia I guess the first question would be how familiar are you wil programming and using API's in general. Especially REST API's. If you are familiar with the process I would recommend getting the REST API Browser app from the marketplace. It is created by Atlassian and allows you to see the available rest API's. The one you want specifically is the "/rest/api/content/" end point. You want to do an http request to that API with a POST method using an authenticated user.
To make the http request, would I be able to format the url like this:
and is there some sort of authentication token I need? or is having the username and password enough of an authentication for the request.
Hey there! New in town? Check out the new Confluence product guides! They are chock-full of helpful tips, tricks, and best practices to get you and your team started. Here’s a quick overview...
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