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

Store temporary avatar using multipart

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.

POST/api/2/project/{projectIdOrKey}/avatar/temporary
Authorization
AuthorizationBasic auth · headerrequired

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

Path parameters
projectIdOrKeystringrequired

Project id or project key

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
404

Returned if the currently authenticated user does not have EDIT PROJECT permission

Try it
Server
Authorization
Parameters
Bodymultipart/form-data
Request
curl -X POST 'http://jira.example.com/rest/api/2/project/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?