Retrieve Question Ghost Edits

/question/{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/question/963/revision.json?ghostEdit=true

Expected Responses

  • Successful Responses:
    HTTP Status Code: 200 - OK

  • Error Responses
    HTTP Status Code: 401 - Unauthorized

Sample Response

Successful Response Example

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "list": [
        {
            "id": 1001,
            "revision": 2,
            "node": {
                "id": 963
            },
            "title": "Can I create a question?",
            "body": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Proin eget tortor risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br /><br />Editing as ghost edit with this statement.</p>",
            "bodyAsHTML": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Proin eget tortor risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br /><br />Editing as ghost edit with this statement.</p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 77
            },
            "summary": "testing ghost edit",
            "revisionDate": 1559935937000,
            "revisionDateFormatted": "6/7/19 7:32 PM",
            "topics": "ghost edit",
            "slug": "can-i-create-a-question-1",
            "wiki": false,
            "ghostEdit": true
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!