Retrieve Answer Ghost Edits

/answer/{id}/revision.json

  • We added a new field called ghostEdit to the payload and added a query parameter called ghostEdit to the GET method:
    • If you do not specify the ghostEdit query parameter, the system will return all revisions.
    • If the ghostEdit query parameter is set to true, the system will only return ghost edit revisions.
    • If the ghostEdit query parameter is set to false, the system will return non-ghost edit revisions.
  • Example request with the query parameter:
    • /services/v2/question/{id}/revision.json?ghostEdit=true

🚧

Permissions & Notes:

  • You must have the new permission called Hide moderator edit under Moderation Roles in the Advanced Editor, to grant moderators the opportunity to see the checkbox to hide their edits in the community UI.

Sample Request

-u "answerhub:test123"
-H "Accept: application/json"
-H "Content-type: application/json"
-X GET "http://apidocs.cloud.answerhub.com/services/v2/answer/971/revision.json?ghostEdit=true

Expected Responses

  • Successful Responses:
    HTTP Status Code: 200 - OK

  • Error Responses
    HTTP Status Code: 401 - Unauthorized

Sample Response

Successful Response

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "list": [
        {
            "id": 1003,
            "revision": 2,
            "node": {
                "id": 971
            },
            "body": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">test answer. Now I am editing as a moderator with ghost edit permission</p>",
            "bodyAsHTML": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">test answer. Now I am editing as a moderator with ghost edit permission</p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 77
            },
            "summary": "testing ghost edit answer",
            "revisionDate": 1559936155000,
            "revisionDateFormatted": "6/7/19 7:35 PM",
            "wiki": false,
            "ghostEdit": true
        }
    ]
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!