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":{}}
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.
@Jim Knepley - ReleaseTEAM whoops! Good catch! Fixed the URL, but still getting the same error. I updated the example with the updated url.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.