Retrieve a List of Revisions Made to an Answer

You can use this API request to get a list of revisions posted to an answer.

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

You can use the following parameters in your get list of revisions made to an answer request:

Paging and Sorting: page, pageSize, sort
Projection: include, exclude, includeOnly
Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the View revisions permission under Moderation Roles under the Advanced Editor.

  • This request works just like the /services/v2/node/revision.json

  • With the includeOnly parameter set to id and name (/services/v2/answer/[answerId]/revision.json?includeOnly=id,name) to the AnswerHub REST API.

  • We added this request in version 1.6.3.

Sample Request

A GET get a list of revisions made to an answer request to get a list of revisions made to an answer (answerId: 807) 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/807/revision.json" -v

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 4,
    "totalCount": 4,
    "list": [
        {
            "id": 825,
            "revision": 4,
            "node": {
                "id": 807
            },
            "body": "<p>CHECK OUT THIS PAGE! </p><p>Here you can learn how to enable the JIRA plugin: </p><p>- <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "bodyAsHTML": "<p>CHECK OUT THIS PAGE! </p><p>Here you can learn how to enable the JIRA plugin: </p><p>- <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "author": {
                "id": 108,
                "username": "admin",
                "reputation": 91
            },
            "summary": "",
            "revisionDate": 1549310516000,
            "revisionDateFormatted": "2/4/19 8:01 PM",
            "wiki": false
        },
        {
            "id": 824,
            "revision": 3,
            "node": {
                "id": 807
            },
            "body": "<p>CHECK OUT THIS PAGE! Here you can learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "bodyAsHTML": "<p>CHECK OUT THIS PAGE! Here you can learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "",
            "revisionDate": 1549309796000,
            "revisionDateFormatted": "2/4/19 7:49 PM",
            "wiki": false
        },
        {
            "id": 838,
            "revision": 2,
            "node": {
                "id": 807
            },
            "body": "<p>Check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "bodyAsHTML": "<p>Check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "",
            "revisionDate": 1549309667000,
            "revisionDateFormatted": "2/4/19 7:47 PM",
            "wiki": false
        },
        {
            "id": 807,
            "revision": 1,
            "node": {
                "id": 807
            },
            "body": "<p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p>",
            "bodyAsHTML": "<p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "Initial Revision",
            "revisionDate": 1547743768000,
            "revisionDateFormatted": "1/17/19 4:49 PM",
            "wiki": false
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!