Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get footer comment details using Rest Api

Sagnik Mukhopadhyay October 5, 2023

Currently we 'https://api.atlassian.com/ex/confluence/{my_clouid_id}/wiki/api/v2/footer-comments/{comment-id}' use this API for footer comments details. After running this api we get
{
"id": "xxxxx",
"status": "current",
"title": "Re: <page name>",
"pageId": "xxxxxxx",
"version": {
"number": 1,
"message": "",
"minorEdit": false,
"authorId": "xxxxxxxxxxx",
"createdAt": "2023-10-03T06:34:30.003Z"
},
"_links": {
"webui": "/spaces/{my_space_key}/pages/{my_page_id}/{page_name}?focusedCommentId={comment_id}"
}
}
this response, but confluence documentation say that response should be {
"results": [
{
"id": "",
"status": "current",
"title": "",
"pageId": "",
"version": {
"createdAt": "",
"message": "",
"number": 19,
"minorEdit": true,
"authorId": ""
},
"body": {
"storage": {},
"atlas_doc_format": {}
},
"_links": {
"webui": ""
}
}
],
"_links": {
"next": ""
}
}
So, can you help to get the correct answer for the footer comment details using Rest api.

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment/#api-footer-comments-comment-id-get this confluence documentation we follow.

1 answer

1 accepted

0 votes
Answer accepted
Andrii Maliuta
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.
October 5, 2023

Hello @Sagnik Mukhopadhyay ,

To get the ARRAY  of comments (footer comments) for a page you use:

/pages/{id}/footer-comments

then the response contains the object with results element.

To get the data about ONE exact comment you use:

/footer-comments/{comment-id}

 Then you get one comment object with necessary data.

Sagnik Mukhopadhyay October 5, 2023

@Andrii Maliuta Yes, we follow this way and we get a response but we couldn't see
"body": { "storage": { "representation": "<string>", "value": "<string>" }, "atlas_doc_format": { "representation": "<string>", "value": "<string>" }, "view": { "representation": "<string>", "value": "<string>" } }, this part,
In our API response, we are missing this body part.

Andrii Maliuta
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.
October 5, 2023 edited

@Sagnik Mukhopadhyay ,

To get the body, you should add the 'body-format' query parameter:

ex:

/api/v2/pages/1234567/footer-comments?body-format=storage

/api/v2/footer-comments/11223344?body-format=storage
Like YY Brother likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Upcoming Confluence Events