get https://apidocs.cloud.answerhub.com/services/v2/comment//revision.json
/comment/{comment_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 returns all revisions.
- If the ghostEdit query parameter is set to true, the system only returns ghost edit revisions.
- If the ghostEdit query parameter is set to false, the system returns 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/comment/972/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": 1006,
"revision": 3,
"node": {
"id": 972
},
"body": "<p>creating a test comment. Editing as ghost edit.</p>",
"bodyAsHTML": "<p>creating a test comment. Editing as ghost edit.</p>",
"author": {
"id": 7,
"username": "dzone",
"reputation": 77
},
"summary": "",
"revisionDate": 1559936299000,
"revisionDateFormatted": "6/7/19 7:38 PM",
"wiki": false,
"ghostEdit": true
}
]
}