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

Whether Confluence Server can be accessed by using the Confluence Cloud API Endpoints?

I explain my question with one example.

To get the user information from the confluence, we can use this API Endpoint 

https://{sitename}.atlassian.net/wiki/rest/api/user?accountId={accountId} in Confluence Cloud.

But the same API Endpoint can't be used in the Confluence Server(on-premise)since it doesn't support any query parameter like accountId. And also the responses from these 2 API Endpoints are differed in their node (JSON Response) structure.

I have also mentioned the reference link: https://docs.atlassian.com/ConfluenceServer/rest/7.1.0/#api/user-getUser

So, my final conclusion is that Confluence cloud and On-premise server have different API Endpoints for retrieving the contents.

Whether it is correct or not?

Kindly share your thoughts on this and if my understanding is wrong, kindly correct the same

1 answer

1 accepted

0 votes
Answer accepted

Hello @Gajapriya Masilamani,

Nice to hear from you again! That is true, Confluence Cloud and Server have different API endpoints. They are developed separately, and so if you want to make a call on Server that you have on Cloud and vice-versa, you'll want to check to make sure that the endpoint exists for both.

The documentation you found is correct for Server, and you can compare it to Confluence Cloud REST documentation.

Regards,

Shannon

Hi Shannon,

Thank You for your response.We will check the API Documentation of Confluence Server and Cloud based on our needs and will use the same.

Regards,

Gajapriya.

Hi Shannon,

I have one more doubt regarding the Confluence Cloud and Server APIs.

Whether the responses given by the APIs are differ in their node structure.

For example,

To get the content with the id 1234, /rest/api/content/1234 Endpoint is used in both the Confluence Server and Cloud.

But, the responses given by the Confluence Server and Cloud are different(i.e)some nodes are missed and order of nodes changed in response (JSON Response) . I checked this with the sample response for Server since we are not configured any On-prem server yet.

So, my final conclusion is that responses given by both the APIs are differ in their node structure ( JSON Response ).

Kindly share your thoughts on the same.

Thank You.

Hello @Gajapriya Masilamani,

As I mentioned previously, the API for Confluence Server and Cloud are completely different and developed separately. There are some cases where you might find they are similar across Server and Cloud, but this isn't the norm. You will need to check the API documentation for each. 

For example, with the example you provided in your question. In our Cloud products (Jira, Confluence, and Bitbucket Cloud), we deprecated usernames and thus you need to reference users with their account ID, whereas in Server, you can refer to usernames still in your API calls.

Let me know if you have any questions about that.

Regards,

Shannon

Hi Shannon,

Thank You for your response.Now I understood it clearly.

Regards,

Gajapriya.

Like Shannon_Spaniol likes this

You're welcome, Gajapriya!

Take care, and have a pleasant rest of your week.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

314 views 9 7
Join discussion

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