Unable to upload the avatar for asset

Diwakar Murthy March 5, 2025

We are trying to get and update the avatar to an asset object. 


But we also get a 401 error, the same token is working for other operations like updating the asset s attributes value. 

https://api.atlassian.com/jsm/insight/workspace/<workspaceID>/v1/avatar/upload

 

Response ::

{
"errorMessages": [
"Sorry, you do not have permission to perform this action. PermissionInsightException: User <ID> didn't have correct permission (admin)."
],
"errors": {}
}

1 answer

2 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

Hi @Diwakar Murthy 

On the asset API endpoint on Cloud there is no avatar option, only icon, but only get options.

https://developer.atlassian.com/cloud/assets/rest/api-group-aql/#api-group-aql 

You might have used the server API.

Diwakar Murthy March 5, 2025

Hi @Marc - Devoteam , we are referring to this document. 
And it is possible to update Avatar for assets via this Api. 

https://confluence.atlassian.com/jirakb/how-to-upload-avatars-on-assets-objects-using-rest-api-1128301129.html

Wonder why this needs admin access via api to update avatar. 

As we are able to update the avatar from front end as a user. 

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

Hi @Diwakar Murthy 

This is because the icons (avatars) in assets in Cloud are on global level, only admins can make changes here.

Icons (avatars) are not maintained on a schema level.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events