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

Gajapriya Masilamani November 11, 2019

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
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 11, 2019

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

Gajapriya Masilamani November 11, 2019

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.

Gajapriya Masilamani November 11, 2019

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.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2019

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

Gajapriya Masilamani November 12, 2019

Hi Shannon,

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

Regards,

Gajapriya.

Like Shannon S likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2019

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
AUG Leaders

Atlassian Community Events