Confluence Questions REST ResourcesPUBLIC SINCE 2.3

by Atlassian for Confluence Server 5.3+

AnswerResource

The following resources are applicable:

/answer

Mount Point: /rest/questions/1.0/answer

GET

Get answers made by a specific user. Anonymous access is allowed.

Parameters

name description type default
limit the number of answers per page query
start the start index query
username the user who made the answers query

Response Body

element: detailedAnswerDTO
media types: application/json

the detailed answers

/answer/{answerId}

Mount Point: /rest/questions/1.0/answer/{answerId}

GET

Get an answer by ID. Anonymous access is allowed.

Parameters

name description type default
answerId ID of the answer path

Response Body

element: answerDTO
media types: application/json

the current answer

DELETE

Delete an answer by ID

Parameters

name description type default
answerId the ID of the answer to be deleted path

Response Body

element: (custom)
media types: application/json

200 OK on success or 404 NOT FOUND if the answer is not found

/answer/{answerId}/vote

Mount Point: /rest/questions/1.0/answer/{answerId}/vote

GET

Get the vote summary of an answer

Parameters

name description type default
answerId ID of the answer path

Response Body

element: votesDTO
media types: application/json

a JSON representation of the votes of an answer

/answer/{answerId}/vote/{type}

Mount Point: /rest/questions/1.0/answer/{answerId}/vote/{type}

POST

Vote an answer

Parameters

name description type default
answerId ID of the answer path
type the type of a vote. Possible values are: "up", "down", "none" path

Response Body

element: votesDTO
media types: application/json

a JSON representation of the new votes on success. Otherwise, 400 BAD REQUEST is returned if the vote type is invalid or the answer is not found

DELETE

Remove vote from an answer

Parameters

name description type default
answerId ID of the answer path
type type of the vote. Possible values are: "none", "up", "down" path

Response Body

element: votesDTO
media types: application/json

a JSON representation of the removed vote

/answer/count

Mount Point: /rest/questions/1.0/answer/count

GET

Get the total number of answers for a topic or a space

Parameters

name description type default
topicId an optional topic ID query -1
spaceKey an optional space key (ignored if a topic ID is provided) query

Response Body

element: (custom)
media types: application/json

the total number of answers for a topic or a space or 0 if no topic or space is specified