Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Create temporary avatar using multipart for issue type

Creates temporary avatar using multipart. The response is sent back as JSON stored in a textarea. This is because the client uses remote iframing to submit avatars using multipart. So we must send them a valid HTML page back from which the client parses the JSON from. Creating a temporary avatar is part of a 3-step process in uploading a new avatar for an issue type: upload, crop, confirm. This endpoint allows you to use a multipart upload instead of sending the image directly as the request body. You must use “avatar” as the name of the upload parameter: curl -c cookiejar.txt -X POST -u admin:admin -H “X-Atlassian-Token: no-check”
-F “avatar=@mynewavatar.png;type=image/png”
‘http://localhost:8090/jira/rest/api/2/issuetype/1/avatar/temporary’

POST/api/2/issuetype/{id}/avatar/temporary
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Path parameters
idstringrequired

The issue type id.

Request body
multipart/form-data
contentTypestring
formFieldboolean
inputStreamobject
namestring
sizeinteger<int64>
valuestring
Responses
201

Temporary avatar cropping instructions embeded in HTML page. Error messages will also be embeded in the page.

cropperOffsetXinteger<int32>
cropperOffsetYinteger<int32>
cropperWidthinteger<int32>
needsCroppingboolean
urlstring
401

Returned if the calling user is not authenticated.

403

Returned if the calling user does not have permission to administer Jira.

404

Returned if the issue type to update does not exist or if the request does not contain valid XSRF token.

Try it
Server
Authorization
Parameters
Bodymultipart/form-data
Request
curl -X POST 'http://jira.example.com/rest/api/2/issuetype/string/avatar/temporary' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  --form-string 'contentType=string' \
  --form-string 'formField=true' \
  --form-string 'inputStream={}' \
  --form-string 'name=string' \
  --form-string 'size=0' \
  --form-string 'value=string'
Response
{
  "cropperOffsetX": 50,
  "cropperOffsetY": 50,
  "cropperWidth": 120,
  "needsCropping": true,
  "url": "http://example.com/jira/secure/temporaryavatar?cropped=true"
}

Was this page helpful?