It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to retrieve a mentioned user's name from cql ? Edited

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") )&


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"

2 answers

Is there any other alternative solution ?

Any thoughts on this guys?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

7,545 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you