Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know the current rest api version of the confluence server

apathytz December 31, 2020

I only know the version of the confluence server, but the rest api is not consistent with it.

1 answer

1 accepted

1 vote
Answer accepted
Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 31, 2020

Hi @apathytz

welcome to the Atlassian Community!

The REST API version of Confluence Server correspondents with its version number, you can compare here:
https://docs.atlassian.com/ConfluenceServer/rest/7.10.0/

Let's assume you have currently installed Confluence version 6.6.17 you can change the URL so it reads:
https://docs.atlassian.com/ConfluenceServer/rest/6.6.17/

It this what you were looking for?

Cheers,
Daniel

apathytz December 31, 2020

I am using Atlassian Confluence 6.15.8, but when I look up the API of https://docs.atlassian.com/ConfluenceServer/rest/6.15.8, the response I get after actually calling is inconsistent with the API

 

for example,

When I call /rest/api/space?spaceKey=api, the structure returned is 

{
"results": [
{
"id": xxx,
"key": "api",
"name": "xxx",
"type": "global",
"_links": {
"webui": "/display/api",
"self": "xxx"
},
"_expandable": {
"metadata": "",
"icon": "",
"description": "",
"homepage": "/rest/api/content/xxx"
}
}
],
"start": 0,
"limit": 25,
"size": 1,
"_links": {
"self": "https://xxx/rest/api/space?spaceKey=api&status=current",
"base": "https://xxx",
"context": ""
}
}

But the response of the document is

https://docs.atlassian.com/ConfluenceServer/rest/6.15.8/#api/space-spaces


Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 31, 2020

Yes, that's correct, your response matches the document.

I think the problem is that you're not understanding that your call to the api is going to return the data about your space, rather than a clone of the example.  The call you are making is not the same as the one in the documentation example, and your spaces are not set up the same as the confluence the documentation is based on.

apathytz December 31, 2020

ok, I got it, thanks. The document only gives one example of response of the current API, but what I need is a common response, otherwise I cannot know the structure of the API response, because the only way I get the api information is the document. So when I cannot actually call a certain version of the API, is there any good way for me to get the common response?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 31, 2020

The REST API docs document the format of the response.  The example output is already a "common response", it's just got data in it that is different to yours.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events