Skip to content

universal_avatar

delete-avatar

Delete avatar

Deletes an avatar from a project, issue type or priority.

Permissions required: Administer Jira global permission.

DELETE /rest/api/3/universal_avatar/type/{type}/owner/{owningObjectId}/avatar/{id}

FlagTypeRequiredDescription
--idstringYesThe ID of the avatar.
--owningObjectIdstringYesThe ID of the item the avatar is associated with.
--typestringYesThe avatar type.

Example:

bash
jr universal_avatar delete-avatar --id <id> --owningObjectId <owningObjectId> --type <type>

get-avatar-image-by-id

Get avatar image by ID

Returns a project, issue type or priority avatar image by ID.

This operation can be accessed anonymously.

Permissions required:

  • For system avatars, none.
  • For custom project avatars, Browse projects project permission for the project the avatar belongs to.
  • For custom issue type avatars, Browse projects project permission for at least one project the issue type is used in.
  • For priority avatars, none.

GET /rest/api/3/universal_avatar/view/type/{type}/avatar/{id}

FlagTypeRequiredDescription
--formatstringNoThe format to return the avatar image in. If not provided the original content format is returned.
--idstringYesThe ID of the avatar.
--sizestringNoThe size of the avatar image. If not provided the default size is returned.
--typestringYesThe icon type of the avatar.

Example:

bash
jr universal_avatar get-avatar-image-by-id --id <id> --type <type>

get-avatar-image-by-owner

Get avatar image by owner

Returns the avatar image for a project, issue type or priority.

This operation can be accessed anonymously.

Permissions required:

  • For system avatars, none.
  • For custom project avatars, Browse projects project permission for the project the avatar belongs to.
  • For custom issue type avatars, Browse projects project permission for at least one project the issue type is used in.
  • For priority avatars, none.

GET /rest/api/3/universal_avatar/view/type/{type}/owner/{entityId}

FlagTypeRequiredDescription
--entityIdstringYesThe ID of the project or issue type the avatar belongs to.
--formatstringNoThe format to return the avatar image in. If not provided the original content format is returned.
--sizestringNoThe size of the avatar image. If not provided the default size is returned.
--typestringYesThe icon type of the avatar.

Example:

bash
jr universal_avatar get-avatar-image-by-owner --entityId <entityId> --type <type>

get-avatar-image-by-type

Get avatar image by type

Returns the default project, issue type or priority avatar image.

This operation can be accessed anonymously.

Permissions required: None.

GET /rest/api/3/universal_avatar/view/type/{type}

FlagTypeRequiredDescription
--formatstringNoThe format to return the avatar image in. If not provided the original content format is returned.
--sizestringNoThe size of the avatar image. If not provided the default size is returned.
--typestringYesThe icon type of the avatar.

Example:

bash
jr universal_avatar get-avatar-image-by-type --type <type>

get-avatars

Get avatars

Returns the system and custom avatars for a project, issue type or priority.

This operation can be accessed anonymously.

Permissions required:

  • for custom project avatars, Browse projects project permission for the project the avatar belongs to.
  • for custom issue type avatars, Browse projects project permission for at least one project the issue type is used in.
  • for system avatars, none.
  • for priority avatars, none.

GET /rest/api/3/universal_avatar/type/{type}/owner/{entityId}

FlagTypeRequiredDescription
--entityIdstringYesThe ID of the item the avatar is associated with.
--typestringYesThe avatar type.

Example:

bash
jr universal_avatar get-avatars --entityId <entityId> --type <type>

store-avatar

Load avatar

Loads a custom avatar for a project, issue type or priority.

Specify the avatar's local file location in the body of the request. Also, include the following headers:

  • X-Atlassian-Token: no-check To prevent XSRF protection blocking the request, for more information see Special Headers.
  • Content-Type: image/image type Valid image types are JPEG, GIF, or PNG.

For example:
curl --request POST

--user email@example.com:<api_token>

--header 'X-Atlassian-Token: no-check'

--header 'Content-Type: image/< image_type>'

--data-binary "<@/path/to/file/with/your/avatar>"

--url 'https://your-domain.atlassian.net/rest/api/3/universal_avatar/type/{type}/owner/{entityId}'

The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image.

The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size.

After creating the avatar use:

Permissions required: Administer Jira global permission.

POST /rest/api/3/universal_avatar/type/{type}/owner/{entityId}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--entityIdstringYesThe ID of the item the avatar is associated with.
--sizestringNoThe length of each side of the crop region.
--typestringYesThe avatar type.
--xstringNoThe X coordinate of the top-left corner of the crop region.
--ystringNoThe Y coordinate of the top-left corner of the crop region.

Example:

bash
jr universal_avatar store-avatar --entityId <entityId> --type <type>