Forums

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

How to update user avatars with Jira's current Datacenter API?

Brandon Jabout
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!
May 14, 2025

For new users that are registered into Jira Datacenter upon hire, I had a Python script that would load their avatar in from another source into Jira via the REST API. That has failed recently and I have been investigating why. I have been looking at the Jira Datacenter Avatar Documentation for information, but even with that I cannot seem to get it working. I have been experimenting with CURL commands, and this is the closest I've gotten with setting a temporary avatar. The response back is a 400. How would I do this successfully? I am using version 10.5.1. This command is testing this functionality on a local running instance.

curl -u admin:admin \
-X POST \
-H "X-Atlassian-Token: no-check" \
-H "Accept: application/json" \
-F "filename=@admin.jpg" \
"http://127.0.0.1:8080/rest/api/2/avatar/user/temporary?username=admin"

Response:

{"errorMessages":[null],"errors":{}}

 

1 answer

0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
May 14, 2025

Hi @Brandon Jabout 

I think your URL is incorrect. The API call for creating an avatar is

/rest/api/2/avatar/user/temporary

Your example has "user" and "avatar" reversed.

Brandon Jabout
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!
May 14, 2025

@Jim Knepley - ReleaseTEAM whoops! Good catch! Fixed the URL, but still getting the same error. I updated the example with the updated url.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events