I would like to retrieve the mentioned user's name (mentionee) from the CQL REST API.
Currently it only gives me the username of the person who mentioned another user (mentioner).
Eg query:
http://localhost:8090/rest/api/content/search?cql=(mention != 'anonymous' and type='comment' and created>now("-1w") )&expand=metadata.properties
Eg response:
Here the "version" key contains the user who mentioned another user's name
{
"id": "65629",
"type": "comment",
"status": "current",
"title": "Re: Product",
"version": {
"by": {
"type": "known",
"username": "ken",
"userKey": "ff8080817011ca7d017011d7591e0002",
"profilePicture": {
"path": "/images/icons/profilepics/default.svg",
"width": 48,
"height": 48,
"isDefault": true
},
"displayName": "Kenneth",
"_links": {
"self": "http://localhost:8090/rest/api/user?key=ff8080817011ca7d017011d7591e0002"
},
"_expandable": {
"status": ""
}
},
"when": "2020-02-07T10:08:16.165-05:00",
"message": "",
"number": 1,
"minorEdit": false,
"hidden": false,
"_links": {
"self": "http://localhost:8090/rest/experimental/content/65629/version/1"
},
"_expandable": {
"content": "/rest/api/content/65629"
}
},
"extensions": {
"location": "footer",
"_expandable": {
"resolution": ""
}
},
"_links": {
"webui": "/display/PROD/Product?focusedCommentId=65629#comment-65629",
"self": "http://localhost:8090/rest/api/content/65629"
},
"_expandable": {
"container": "/rest/api/content/65591",
"metadata": "",
"operations": "",
"children": "/rest/api/content/65629/child",
"restrictions": "/rest/api/content/65629/restriction/byOperation",
"history": "/rest/api/content/65629/history",
"ancestors": "",
"body": "",
"descendants": "/rest/api/content/65629/descendant",
"space": "/rest/api/space/PROD"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.