The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Need to show only one dimension of avatarUrls using USER REST API

Shiva Reddy Gadiga
December 26, 2021

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Prince Nyeche - ELFAPP
Atlassian Partner
December 27, 2021

Why don't you access the JSON key specifically for "48x48"?

avatar = avatarUrls["48x48"]
Shiva Reddy Gadiga
December 28, 2021

Hi Prince,

Thank you i have tried it and still it displaying all 4 dimensions.

Thank you,
Shiva.

Prince Nyeche - ELFAPP
Atlassian Partner
December 29, 2021

I would expect it to display only

https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png"

Which is the string of the URL and nothing more when accessing the specific key. Except you're still calling it as 

avatar = avatarUrls 
Shiva Reddy Gadiga
December 29, 2021

Hi 

I have slightly modified the structure in JSON file for this avatar urls attributes.


Now able to see the selected dimension.

Regards,
Shiva.

0 votes
Mohamed Benziane
Community Champion
December 27, 2021

Hi,

Which URL do you use to get this response ?

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events