Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence : userkey to usre name convrsion

M
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 20, 2015

Hello,

I need to translate <ri:user ri:userkey="xxxxxxx" />  to user name using REST api. I am geting <ri:user ...> element when get storage of confluence content using following REST call.

https://example.com:8080/confluence/rest/api/content/24183304?expand=body.storage

To convert to user, i tried following  

http://example.com:8080/jira/rest/api/2/user?key=xxxxxxx

but it returned user not exists error message

{"errorMessages":["The user with the key 'xxxxxxx' does not exist"],"errors":{}}

 

Thanks

1 answer

0 votes
Rodrigo Girardi Adami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2015

Hi Munjai,

Instead of using this rest call, you can use this one below to get the user key and username for the page:

confluence/rest/api/content/24183304?getpage

I hope this helps!

Cheers,

Rodrigo

M
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 20, 2015

Thanks Rodrigo, I got clue from above and solved it using different view https://example.com:8080/confluence/rest/api/content/24183304?expand=body.export_view

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events