public class UniversalAvatarApi extends Object
| Constructor and Description |
|---|
UniversalAvatarApi(org.everit.http.restclient.RestClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Completable |
deleteAvatar(String type,
String owningObjectId,
Long id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Delete avatar
Deletes an avatar from a project or issue type.
|
io.reactivex.Single<Avatars> |
getAvatars(String type,
String entityId,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get avatars
Returns the system and custom avatars for a project or issue type.
|
io.reactivex.Single<Avatar> |
storeAvatar(String type,
String entityId,
Object body,
Optional<Integer> x,
Optional<Integer> y,
Optional<Integer> size,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Load avatar
Loads a custom avatar for a project or issue type.
|
public UniversalAvatarApi(org.everit.http.restclient.RestClient restClient)
public io.reactivex.Completable deleteAvatar(String type, String owningObjectId, Long id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deletes an avatar from a project or issue type.
Permissions required: Administer Jira global permission.
type - The type of the entity. Valid values are project and issuetype.
owningObjectId - The ID of the entity item.
(required)id - The ID of the avatar.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Avatars> getAvatars(String type, String entityId, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the system and custom avatars for a project or issue type.
This operation can be accessed anonymously.
Permissions required: None.
type - The type of the entity. Valid values are project and issuetype.
entityId - The ID of the entity item.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Avatar> storeAvatar(String type, String entityId, Object body, Optional<Integer> x, Optional<Integer> y, Optional<Integer> size, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Loads a custom avatar for a project or issue type.
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.
type - The type of the entity. Valid values are project and issuetype.
entityId - The ID of the entity item.
(required)body - (required)x - The X coordinate of the top-left corner of the crop region.
(optional, default to 0)y - The Y coordinate of the top-left corner of the crop region.
(optional, default to 0)size - The length of each side of the crop region.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
Copyright © 2011–2021 Everit Kft.. All rights reserved.