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

Utilizing the Confluence REST API Edited

Hi,

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!

2 answers

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,
  Oliver

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?

0 votes
Davin Studer Community Leader Jun 29, 2020

@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:

http://confluence."mycompany".com/rest/api/content/

and is there some sort of authentication token I need? or is having the username and password enough of an authentication for the request.

Davin Studer Community Leader Jun 29, 2020

If http://confluence."mycompany".com is how you access Confluence then yes.

Suggest an answer

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

Fast-track your Confluence onboarding with the Confluence product guides!

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...

82 views 3 1
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