Retrieve Answer Information

You can use this API request to retrieve detailed information about an answer posted to a question on your AnswerHub site.

/services/v2/answer/[answerId].json

You can use the following parameters in your retrieve answer information request:

Projection: include, exclude, includeOnly
Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the View answers in the question page permission.
  • With the includeOnly parameter set to id and name (/services/v2/answer.json?includeOnly=id,name) to the AnswerHub REST API.
  • We added this request in version 1.6.3.

Sample Request

A GET answer information request for an answer (answerId: 812) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X GET "https://apidocs.cloud.answerhub.com/services/v2/answer/812.json"

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "id": 812,
    "type": "answer",
    "creationDate": 1547744013000,
    "creationDateFormatted": "01/17/2019 04:53 PM",
    "body": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
    "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
    "author": {
        "id": 7,
        "username": "dzone",
        "reputation": 54
    },
    "lastEditedAction": 935,
    "activeRevisionId": 812,
    "revisionIds": [
        812
    ],
    "lastActiveUserId": 7,
    "lastActiveDate": 1547744013000,
    "originalParentId": 520,
    "attachments": [],
    "childrenIds": [],
    "commentIds": [],
    "marked": false,
    "topics": [],
    "containerIds": [],
    "wiki": false,
    "score": 0,
    "depth": 0,
    "viewCount": 0,
    "upVoteCount": 0,
    "downVoteCount": 0,
    "nodeStates": []
}
Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!