Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Is there a way to get the user email from expansions in the REST API

Eg: If I make a cql search for a particular user id mention, can I somehow fetch the user email in the same API call ?

 

http://localhost:8090/rest/api/content/search?cql=(mention != 'anonymous' and type='comment' and created>now("-15h") )&expand=history,version

 

 

1 answer

0 votes
DPK J Community Leader Feb 09, 2020

@sabzx  Simple answer is no. The API you are using here is for content, and you will only get user name and user key as users information.

Thanks @DPK JCurrently the API does not return any information about the mentionee. It only has information about the mentioner. Is there anyone way to get the mentionee's information?

{
"results": [
{
"id": "65635",
"type": "comment",
"status": "current",
"title": "Re: Product",
"body": {
"_expandable": {
"editor": "",
"view": "",
"export_view": "",
"styled_view": "",
"storage": "",
"anonymous_export_view": ""
}
},
"extensions": {
"location": "footer",
"_expandable": {
"resolution": ""
}
},
"_links": {
"webui": "/display/PROD/Product?focusedCommentId=65635#comment-65635",
"self": "http://localhost:8090/rest/api/content/65635"
},
"_expandable": {
"container": "/rest/api/content/65591",
"metadata": "",
"operations": "",
"children": "/rest/api/content/65635/child",
"restrictions": "/rest/api/content/65635/restriction/byOperation",
"history": "/rest/api/content/65635/history",
"ancestors": "",
"version": "",
"descendants": "/rest/api/content/65635/descendant",
"space": "/rest/api/space/PROD"
}
},
],
"start": 0,
"limit": 25,
"size": 2,
"cqlQuery": "(mention != 'anonymous' and type='comment' and created>now(\"-72h\") )",
"searchDuration": 27,
"totalSize": 2,
"_links": {
"self": "http://localhost:8090/rest/api/content/search?expand=body&cql=%28mention%20%21=%20%27anonymous%27%20and%20type=%27comment%27%20and%20created%3Enow%28%22-72h%22%29%20%29",
"base": "http://localhost:8090",
"context": ""
}
}

Suggest an answer

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

Please tell us how you use Confluence space settings

👋 Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with im...

183 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